Skip to content

Commit

Permalink
Add CDK v2 Support (#84)
Browse files Browse the repository at this point in the history
Added CDK V2 support
  • Loading branch information
thedavl authored Feb 3, 2022
1 parent 7389488 commit 01ad64d
Show file tree
Hide file tree
Showing 75 changed files with 16,702 additions and 421 deletions.
61 changes: 54 additions & 7 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ on: push
jobs:
lint:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
working-dir: [v1,v2]
defaults:
run:
working-directory: v1
working-directory: ${{ matrix.working-dir }}
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -22,7 +26,7 @@ jobs:
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}-${{ matrix.working-dir }}

- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
Expand All @@ -46,13 +50,14 @@ jobs:

test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: v1
strategy:
max-parallel: 4
matrix:
node-version: [12,14,16]
working-dir: [v1,v2]
node-version: [14,16]
defaults:
run:
working-directory: ${{ matrix.working-dir }}

steps:
- name: Checkout
Expand All @@ -68,7 +73,49 @@ jobs:
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}-${{ matrix.working-dir }}

- name: Install common dependencies
working-directory: ./
run: yarn install

- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: yarn install

- name: Build
run: yarn build

- name: Authenticate Docker to Amazon ECR
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws

- name: Run tests
run: yarn test

test-v1-node12:
runs-on: ubuntu-latest
defaults:
run:
working-directory: v1

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Node 12
uses: actions/setup-node@v1
with:
node-version: 12

- name: Cache Node modules
id: cache-node-modules
uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}-v1

- name: Install common dependencies
working-directory: ./
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ on: push
jobs:
integration-tests:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
working-dir: [v1,v2]
defaults:
run:
working-directory: v1
working-directory: ${{ matrix.working-dir }}
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -22,7 +26,7 @@ jobs:
uses: actions/cache@v2
with:
path: "**/node_modules"
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}-${{ matrix.working-dir }}

- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
Expand Down
16 changes: 16 additions & 0 deletions common/scripts/fix-version.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// Helper script used to fix package.json version resetting on builds, and helping bump version.json after releases

// Copies the version from version.json into package.json
var fs = require("fs");
var path = require("path");

var folder = process.argv[2];

version_file_path = path.join(__dirname, "..", "..", folder, "version.json");
package_file_path = path.join(__dirname, "..", "..", folder, "package.json");

var version_json = require(version_file_path);
var package_json = require(package_file_path);

package_json.version = version_json.version;
fs.writeFileSync(package_file_path, JSON.stringify(package_json, null, 2));
45 changes: 23 additions & 22 deletions v1/.eslintrc.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions v1/.gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions v1/.github/workflows/stale.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

98 changes: 98 additions & 0 deletions v1/.github/workflows/upgrade.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 01ad64d

Please sign in to comment.