Skip to content

Commit

Permalink
fix: package-js task not checked by mergify (projen#1426)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions <[email protected]>
  • Loading branch information
Chriscbr and github-actions authored Jan 3, 2022
1 parent bdddf93 commit ef7ff81
Show file tree
Hide file tree
Showing 11 changed files with 228 additions and 84 deletions.
1 change: 0 additions & 1 deletion .gitattributes

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

26 changes: 26 additions & 0 deletions .github/workflows/build.yml

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

36 changes: 0 additions & 36 deletions .github/workflows/integ.yml

This file was deleted.

1 change: 0 additions & 1 deletion .gitignore

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

3 changes: 2 additions & 1 deletion .mergify.yml

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

1 change: 0 additions & 1 deletion .projen/files.json

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

3 changes: 2 additions & 1 deletion .projen/tasks.json

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

44 changes: 6 additions & 38 deletions .projenrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,47 +178,15 @@ const pythonCompatTask = project.addTask("integ:python-compat", {
description:
"Checks that projen's submodule structure does not cause import failures for python. Expects python to be installed and projen to be fully built.",
});
const integTask = project.addTask("integ");
integTask.spawn(project.buildTask);
const integTask = project.addTask("integ", {
description: "Run integration tests",
});
integTask.spawn(project.compileTask);
integTask.spawn(project.tasks.tryFind("package:python"));
integTask.spawn(pythonCompatTask);
project
.tryFindObjectFile(".mergify.yml")
.addOverride("pull_request_rules.0.conditions.3", "status-success=integ");

new github.TaskWorkflow(project.github, {
name: "integ",
jobId: "integ",
triggers: {
pullRequest: {},
workflowDispatch: {},
},
env: {
CI: "true",
},
permissions: {
contents: workflows.JobPermission.READ,
},

preBuildSteps: [
...project.installWorkflowSteps, // install dependencies for projen
{
name: "Set up Python 3.x",
uses: "actions/setup-python@v2",
with: {
"python-version": "3.x",
},
},
{
name: "Set up Go 1.16",
uses: "actions/setup-go@v2",
with: {
"go-version": "^1.16.0",
},
},
],

task: integTask,
project.buildWorkflow.addPostBuildJobTask(integTask, {
tools: { python: { version: "3.x" }, go: { version: "1.16.x" } },
});

project.synth();
74 changes: 74 additions & 0 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ Name|Description
[awscdk.IntegrationTestOptions](#projen-awscdk-integrationtestoptions)|Options for `IntegrationTest`.
[awscdk.LambdaFunctionCommonOptions](#projen-awscdk-lambdafunctioncommonoptions)|Common options for `LambdaFunction`.
[awscdk.LambdaFunctionOptions](#projen-awscdk-lambdafunctionoptions)|Options for `Function`.
[build.AddPostBuildJobCommandsOptions](#projen-build-addpostbuildjobcommandsoptions)|Options for `BuildWorkflow.addPostBuildJobCommands`.
[build.AddPostBuildJobTaskOptions](#projen-build-addpostbuildjobtaskoptions)|Options for `BuildWorkflow.addPostBuildJobTask`.
[build.BuildWorkflowOptions](#projen-build-buildworkflowoptions)|*No description*
[cdk.Catalog](#projen-cdk-catalog)|*No description*
[cdk.ConstructLibraryOptions](#projen-cdk-constructlibraryoptions)|*No description*
Expand Down Expand Up @@ -4056,6 +4058,50 @@ addPostBuildJob(id: string, job: Job): void



#### addPostBuildJobCommands(id, commands, options?)🔹 <a id="projen-build-buildworkflow-addpostbuildjobcommands"></a>

Run a sequence of commands as a job within the build workflow which is executed after the build job succeeded.

Jobs are executed _only_ if the build did NOT self mutate. If the build
self-mutate, the branch will either be updated or the build will fail (in
forks), so there is no point in executing the post-build job.

```ts
addPostBuildJobCommands(id: string, commands: Array<string>, options?: AddPostBuildJobCommandsOptions): void
```

* **id** (<code>string</code>) *No description*
* **commands** (<code>Array<string></code>) *No description*
* **options** (<code>[build.AddPostBuildJobCommandsOptions](#projen-build-addpostbuildjobcommandsoptions)</code>) Specify tools and other options.
* **checkoutRepo** (<code>boolean</code>) Check out the repository at the pull request branch before commands are run. __*Default*__: false
* **installDeps** (<code>boolean</code>) Install project dependencies before running commands. `checkoutRepo` must also be set to true. __*Default*__: false
* **tools** (<code>[github.workflows.Tools](#projen-github-workflows-tools)</code>) Tools that should be installed before the commands are run. __*Optional*__




#### addPostBuildJobTask(task, options)🔹 <a id="projen-build-buildworkflow-addpostbuildjobtask"></a>

Run a task as a job within the build workflow which is executed after the build job succeeded.

The job will have access to build artifacts and will install project
dependencies in order to be able to run any commands used in the tasks.

Jobs are executed _only_ if the build did NOT self mutate. If the build
self-mutate, the branch will either be updated or the build will fail (in
forks), so there is no point in executing the post-build job.

```ts
addPostBuildJobTask(task: Task, options: AddPostBuildJobTaskOptions): void
```

* **task** (<code>[Task](#projen-task)</code>) *No description*
* **options** (<code>[build.AddPostBuildJobTaskOptions](#projen-build-addpostbuildjobtaskoptions)</code>) Specify tools and other options.
* **tools** (<code>[github.workflows.Tools](#projen-github-workflows-tools)</code>) Tools that should be installed before the task is run. __*Optional*__




#### addPostBuildSteps(...steps)🔹 <a id="projen-build-buildworkflow-addpostbuildsteps"></a>

Adds steps that are executed after the build.
Expand Down Expand Up @@ -11656,6 +11702,34 @@ Name | Type | Description



## struct AddPostBuildJobCommandsOptions 🔹 <a id="projen-build-addpostbuildjobcommandsoptions"></a>


Options for `BuildWorkflow.addPostBuildJobCommands`.



Name | Type | Description
-----|------|-------------
**checkoutRepo**?🔹 | <code>boolean</code> | Check out the repository at the pull request branch before commands are run.<br/>__*Default*__: false
**installDeps**?🔹 | <code>boolean</code> | Install project dependencies before running commands. `checkoutRepo` must also be set to true.<br/>__*Default*__: false
**tools**?🔹 | <code>[github.workflows.Tools](#projen-github-workflows-tools)</code> | Tools that should be installed before the commands are run.<br/>__*Optional*__



## struct AddPostBuildJobTaskOptions 🔹 <a id="projen-build-addpostbuildjobtaskoptions"></a>


Options for `BuildWorkflow.addPostBuildJobTask`.



Name | Type | Description
-----|------|-------------
**tools**?🔹 | <code>[github.workflows.Tools](#projen-github-workflows-tools)</code> | Tools that should be installed before the task is run.<br/>__*Optional*__



## struct BuildWorkflowOptions 🔹 <a id="projen-build-buildworkflowoptions"></a>


Expand Down
Loading

0 comments on commit ef7ff81

Please sign in to comment.