Skip to content

Commit

Permalink
Add workflow to test CDK code
Browse files Browse the repository at this point in the history
Signed-off-by: Prudhvi Godithi <[email protected]>
  • Loading branch information
prudhvigodithi committed Apr 3, 2024
1 parent 5ced6c6 commit d61e7b6
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
21 changes: 21 additions & 0 deletions .github/workflows/cdk-ci-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: CDK Test

on:
push:
pull_request:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/[email protected]
with:
node-version: '20.8.0'

- name: Run CDK Test
run: |
cd infrastructure
npm install
npm test
File renamed without changes.
2 changes: 1 addition & 1 deletion infrastructure/test/vpc-stack.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ test('VPC Stack Test', () => {
const vpcStackTemplate = Template.fromStack(vpcStack);
vpcStackTemplate.resourceCountIs('AWS::EC2::VPC', 1);
vpcStackTemplate.resourceCountIs('AWS::EC2::Subnet', 4);
});
});

0 comments on commit d61e7b6

Please sign in to comment.