-
Notifications
You must be signed in to change notification settings - Fork 830
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: Add PR status check reporting for snapshot runs (#4117)
- Loading branch information
1 parent
77224e8
commit 29d8de2
Showing
6 changed files
with
94 additions
and
8 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: CommitStatusEnd | ||
description: 'Adds a commit status at the end of the test run based on success, failure, or cancelled' | ||
inputs: | ||
suite: | ||
description: "Suite that's running" | ||
required: true | ||
git_ref: | ||
description: "The git commit, tag, or branch to check out. Requires a corresponding Karpenter snapshot release" | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: actions/github-script@v6 | ||
if: job.status == 'success' | ||
with: | ||
script: | | ||
github.rest.repos.createCommitStatus({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
context: "${{ github.workflow }} / e2e (${{ inputs.suite }}) / ${{ github.job }}", | ||
sha: "${{ inputs.git_ref }}", | ||
state: "success", | ||
target_url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} (snapshot)", | ||
}); | ||
- uses: actions/github-script@v6 | ||
if: job.status == 'failure' || job.status == 'cancelled' | ||
with: | ||
script: | | ||
github.rest.repos.createCommitStatus({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
context: "${{ github.workflow }} / e2e (${{ inputs.suite }}) / ${{ github.job }} (snapshot)", | ||
sha: "${{ inputs.git_ref }}", | ||
state: "failure", | ||
target_url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", | ||
}); |
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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: CommitStatusStart | ||
description: 'Adds a commit status at the start of the test run to set the status to pending' | ||
inputs: | ||
suite: | ||
description: "Suite that's running" | ||
required: true | ||
git_ref: | ||
description: "The git commit, tag, or branch to check out. Requires a corresponding Karpenter snapshot release" | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: actions/github-script@v6 | ||
if: always() | ||
with: | ||
script: | | ||
github.rest.repos.createCommitStatus({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
context: "${{ github.workflow }} / e2e (${{ inputs.suite }}) / ${{ github.job }} (snapshot)", | ||
sha: "${{ inputs.git_ref }}", | ||
state: "pending", | ||
target_url: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", | ||
}); |
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
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
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
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