From d61e7b6c65f44be231ec21adc4c9560ee7bd883a Mon Sep 17 00:00:00 2001 From: Prudhvi Godithi Date: Wed, 3 Apr 2024 15:30:19 -0700 Subject: [PATCH] Add workflow to test CDK code Signed-off-by: Prudhvi Godithi --- .github/workflows/cdk-ci-test.yml | 21 +++++++++++++++++++ .../{ci-test.yml => java-ci-test.yml} | 0 infrastructure/test/vpc-stack.test.ts | 2 +- 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/cdk-ci-test.yml rename .github/workflows/{ci-test.yml => java-ci-test.yml} (100%) diff --git a/.github/workflows/cdk-ci-test.yml b/.github/workflows/cdk-ci-test.yml new file mode 100644 index 0000000..7b8ee8b --- /dev/null +++ b/.github/workflows/cdk-ci-test.yml @@ -0,0 +1,21 @@ +name: CDK Test + +on: + push: + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v2.4.1 + with: + node-version: '20.8.0' + + - name: Run CDK Test + run: | + cd infrastructure + npm install + npm test diff --git a/.github/workflows/ci-test.yml b/.github/workflows/java-ci-test.yml similarity index 100% rename from .github/workflows/ci-test.yml rename to .github/workflows/java-ci-test.yml diff --git a/infrastructure/test/vpc-stack.test.ts b/infrastructure/test/vpc-stack.test.ts index b5d3933..a06edfa 100644 --- a/infrastructure/test/vpc-stack.test.ts +++ b/infrastructure/test/vpc-stack.test.ts @@ -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); -}); \ No newline at end of file +});