Skip to content

Commit d867201

Browse files
fix: CDK version
1 parent 03f9458 commit d867201

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

.github/workflows/common-test.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ jobs:
7272
- name: Deploy
7373
run: npm run deploy
7474
working-directory: test/cdk-basic
75+
- name: Install previous CDK version
76+
run: |
77+
rm package-lock.json
78+
npm i aws-cdk@2.1124.1 aws-cdk-lib@2.257.0 constructs@10.6.0 -w test/cdk-basic
7579
- name: Test
7680
run: npx vitest --retry 2 test/cdk-basic.test.ts
7781
- name: Test - observability mode
@@ -81,6 +85,18 @@ jobs:
8185
working-directory: test/cdk-basic
8286
- name: Test YAML
8387
run: npx vitest --retry 2 test/cdk-basic.test.ts
88+
# Repeat the tests with the previous version of aws-cdk-lib
89+
# to validate the code injection into aws-cdk-lib works with both versions
90+
# Remove package-lock.json first: it still contains entries for the workspaces removed
91+
# by prepareForTest.js, which confuses npm and leaves aws-cdk-lib uninstalled
92+
# - name: Install previous CDK version
93+
# run: |
94+
# rm package-lock.json
95+
# npm i aws-cdk@2.1124.1 aws-cdk-lib@2.257.0 constructs@10.6.0 -w test/cdk-basic
96+
# - name: Test - previous CDK version
97+
# run: npx vitest --retry 2 test/cdk-basic.test.ts
98+
# - name: Test - previous CDK version - observability mode
99+
# run: OBSERVABLE_MODE=true npx vitest --retry 2 test/cdk-basic.test.ts
84100

85101
test-cdk-esm:
86102
runs-on: ubuntu-latest

package-lock.json

Lines changed: 5 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)