Skip to content

Commit

Permalink
Add ci workflow cdk synth
Browse files Browse the repository at this point in the history
  • Loading branch information
sikleber committed Apr 30, 2024
1 parent 93b5572 commit 02abdc1
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 36 deletions.
77 changes: 41 additions & 36 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:

jobs:
test-frontend:
Expand All @@ -14,29 +13,29 @@ jobs:
working-directory: frontend

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: frontend/package-lock.json
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: frontend/package-lock.json

- name: Install
run: npm install
- name: Install
run: npm install

- name: Lint
run: npm run lint
- name: Lint
run: npm run lint

- name: Format check
run: npm run format:check
- name: Format check
run: npm run format:check

- name: Test
run: npm run test
- name: Test
run: npm run test

- name: Build
run: npm run build
- name: Build
run: npm run build

test-infrastructure:
runs-on: ubuntu-latest
Expand All @@ -45,26 +44,32 @@ jobs:
working-directory: infrastructure

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: infrastructure/package-lock.json

- name: Install AWS CLI
run: npm install -g aws-cdk

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: infrastructure/package-lock.json
- name: Install
run: npm install

- name: Install
run: npm install
- name: Lint
run: npm run lint

- name: Lint
run: npm run lint
- name: Format check
run: npm run format:check

- name: Format check
run: npm run format:check
- name: Test
run: npm run test

- name: Test
run: npm run test
- name: Build
run: npm run build

- name: Build
run: npm run build
- name: CDK Synth
run: npm run synth
1 change: 1 addition & 0 deletions infrastructure/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"lint": "eslint 'src/**/*.{js,jsx,ts,tsx}'",
"test": "jest",
"build": "tsc",
"bootstrap": "cdk bootstrap",
"deploy": "cdk deploy",
"synth": "cdk synth"
},
Expand Down

0 comments on commit 02abdc1

Please sign in to comment.