Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/codecov.yml

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

6 changes: 3 additions & 3 deletions .github/workflows/integ.yml

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

6 changes: 4 additions & 2 deletions .github/workflows/release.yml

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

8 changes: 8 additions & 0 deletions .projen/tasks.json

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

1 change: 1 addition & 0 deletions package.json

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

17 changes: 6 additions & 11 deletions projenrc/adc-publishing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ export class AdcPublishing extends Component {
this.project.tasks.tryFind(taskName)?.exec('tsx projenrc/build-standalone-zip.task.ts');
}

const publishToAdcTask = this.project_.tasks.tryFind('publish-to-adc') ?? this.project_.addTask('publish-to-adc', {
exec: 'tsx projenrc/publish-to-adc.task.ts',
});

const releaseWf = this.project_.github?.tryFindWorkflow('release');
if (!releaseWf) {
throw new Error('Could not find release workflow');
Expand Down Expand Up @@ -40,16 +44,7 @@ export class AdcPublishing extends Component {
if: '${{ needs.release.outputs.latest_commit == github.sha }}',
steps: [
github.WorkflowSteps.checkout(),
{
uses: 'actions/setup-node@v4',
with: {
'node-version': 'lts/*',
},
},
{
name: 'Install dependencies',
run: 'yarn install --check-files --frozen-lockfile',
},
...this.project_.renderWorkflowSetup(),
{
name: 'Download build artifacts',
uses: 'actions/download-artifact@v4',
Expand All @@ -76,7 +71,7 @@ export class AdcPublishing extends Component {
PUBLISHING_ROLE_ARN: '${{ vars.PUBLISHING_ROLE_ARN }}',
TARGET_BUCKETS: '${{ vars.TARGET_BUCKETS }}',
},
run: 'npx tsx projenrc/publish-to-adc.task.ts',
run: this.project_.runTaskCommand(publishToAdcTask),
},
],
});
Expand Down
20 changes: 6 additions & 14 deletions projenrc/cdk-cli-integ-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,8 +239,11 @@ export class CdkCliIntegTestsWorkflow extends Component {
private readonly JOB_PREPARE = 'prepare';
private readonly maxWorkersArg: string = '';

public readonly project: javascript.NodeProject;

constructor(repo: javascript.NodeProject, private readonly props: CdkCliIntegTestsWorkflowProps) {
super(repo);
this.project = repo;

const buildWorkflow = repo.buildWorkflow;
this.workflow = repo.github?.addWorkflow('integ')!;
Expand Down Expand Up @@ -413,28 +416,17 @@ export class CdkCliIntegTestsWorkflow extends Component {
'git fetch upstream \'refs/tags/*:refs/tags/*\'',
].join('\n'),
},
{
name: 'Setup Node.js',
uses: 'actions/setup-node@v4',
with: {
'node-version': 'lts/*',
'cache': 'npm',
},
},
{
name: 'Install dependencies',
run: repo.package.installCommand,
},
...this.project.renderWorkflowSetup(),
{
name: 'Bump to realistic versions',
run: 'yarn workspaces run bump',
run: `${this.project.runTaskCommand(this.project.tasks.tryFind('run')!)} bump`,
env: {
TESTING_CANDIDATE: 'true',
},
},
{
name: 'build',
run: 'npx projen build',
run: this.project.runTaskCommand(this.project.buildTask),
env: {
// This is necessary to prevent projen from resetting the version numbers to
// 0.0.0 during its synthesis.
Expand Down
12 changes: 1 addition & 11 deletions projenrc/codecov.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,7 @@ export class CodeCovWorkflow extends Component {
if: props.restrictToRepos.map(r => `github.repository == '${r}'`).join(' || '),
steps: [
github.WorkflowSteps.checkout(),
{
name: 'Set up Node',
uses: 'actions/setup-node@v4',
with: {
'node-version': 'lts/*',
},
},
{
name: 'Install dependencies',
run: repo.package.installCommand,
},
...repo.renderWorkflowSetup(),
{
name: 'Reset coverage thresholds',
run: 'find . -name "jest.config.json" -type f -exec chmod +w {} \\; -exec node -e "const fs=require(\'fs\'); const file=process.argv[1]; const data=JSON.parse(fs.readFileSync(file)); data.coverageThreshold={ }; fs.writeFileSync(file, JSON.stringify(data, null, 2));" {} \\;',
Expand Down
Loading