-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): validate workflows as part of builds
- Loading branch information
Showing
7 changed files
with
197 additions
and
20 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -246,11 +246,6 @@ export class CdktfProviderProject extends cdk.JsiiProject { | |
workflowRunsOn, | ||
licensed: false, // we do supply our own license file with a custom header | ||
releaseToNpm: true, | ||
devDeps: [ | ||
"@actions/core@^1.1.0", | ||
"dot-prop@^5.2.0", | ||
...(options.devDeps ?? []), | ||
], | ||
name: packageInfo.npm.name, | ||
description: `Prebuilt ${providerName} Provider for Terraform CDK (cdktf)`, | ||
keywords: ["cdktf", "terraform", "cdk", "provider", providerName], | ||
|
@@ -305,6 +300,13 @@ export class CdktfProviderProject extends cdk.JsiiProject { | |
docgen: false, | ||
}); | ||
|
||
this.addDevDeps( | ||
"dot-prop@^5.2.0", | ||
"@actions/core@^1.1.0", | ||
"@action-validator/core", | ||
"@action-validator/cli" | ||
); | ||
|
||
// Default memory is 7GB: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources | ||
// Custom Runners we use have 32GB of memory | ||
// The below numbers set heap limits that are ~1gb and ~0.5gb less, respectively, than the total available memory | ||
|
@@ -318,6 +320,13 @@ export class CdktfProviderProject extends cdk.JsiiProject { | |
|
||
this.tasks.addEnvironment("CHECKPOINT_DISABLE", "1"); | ||
|
||
const validateTask = this.addTask("validate-workflows", { | ||
exec: `find ./.github/workflows -type f -name "*.yml" -print0 | xargs -0 -n 1 npx action-validator`, | ||
}); | ||
validateTask.description = | ||
"Lint the YAML files generated by Projen to define GitHub Actions and Workflows, checking them against published JSON schemas"; | ||
this.postCompileTask.spawn(validateTask); | ||
|
||
this.package.addPackageResolutions("@types/[email protected]"); | ||
|
||
const setSafeDirectory = { | ||
|
Oops, something went wrong.