Skip to content

Commit

Permalink
ci: add build job to test against latest version of cdk packages (#161)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrgrain authored Jul 14, 2022
1 parent c1a8011 commit 31ef196
Show file tree
Hide file tree
Showing 4 changed files with 58 additions and 6 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/build.yml

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

2 changes: 2 additions & 0 deletions .mergify.yml

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

28 changes: 28 additions & 0 deletions .projenrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,34 @@ const project = new awscdk.AwsCdkConstructLibrary({
],
});

// test against latest versions
const REPO_TEMP_DIRECTORY = '.repo';
project.buildWorkflow?.addPostBuildJob('test-latest-versions', {
runsOn: ['ubuntu-latest'],
permissions: {},
tools: {
node: { version: '18.x' },
},
steps: [
{
name: 'Prepare Repository',
run: `mv ${project.artifactsDirectory} ${'.repo'}`,
},
{
name: 'Bump CDK versions',
run: `cd ${REPO_TEMP_DIRECTORY} && npx npm-check-updates -u "/^(@aws-cdk|aws-cdk)/"`,
},
{
name: 'Install Dependencies',
run: `cd ${REPO_TEMP_DIRECTORY} && ${project.package.installAndUpdateLockfileCommand}`,
},
{
name: 'Run tests',
run: `cd ${REPO_TEMP_DIRECTORY} && ${project.runTaskCommand(project.testTask)}`,
},
],
});

// release only via manual trigger
project.release?.publisher?.publishToGit({
changelogFile: 'dist/dist/changelog.md',
Expand Down
12 changes: 6 additions & 6 deletions package-lock.json

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

0 comments on commit 31ef196

Please sign in to comment.