Skip to content

Commit 2d2c590

Browse files
committed
Set PR status after running Java Client v3 integration tests
1 parent c3851e8 commit 2d2c590

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

.github/workflows/java-client-v3-integration-tests.yml

+31
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,35 @@ jobs:
3636
if: always()
3737
with:
3838
report_paths: 'conductor-clients/java/**/build/test-results/test/TEST-*.xml'
39+
- name: Set PR Status to Failure
40+
if: ${{ failure() }}
41+
uses: actions/github-script@v6
42+
with:
43+
script: |
44+
const { owner, repo } = context.repo;
45+
const sha = context.payload.workflow_run.head_sha;
46+
await github.rest.repos.createCommitStatus({
47+
owner: owner,
48+
repo: repo,
49+
sha: sha,
50+
state: 'failure',
51+
context: 'Java Client v3 Integration Tests',
52+
description: 'Integration tests failed.',
53+
});
54+
- name: Set PR Status to Success
55+
if: ${{ success() }}
56+
uses: actions/github-script@v6
57+
with:
58+
script: |
59+
const { owner, repo } = context.repo;
60+
const sha = context.payload.workflow_run.head_sha;
61+
await github.rest.repos.createCommitStatus({
62+
owner: owner,
63+
repo: repo,
64+
sha: sha,
65+
state: 'success',
66+
context: 'Java Client v3 Integration Tests',
67+
description: 'Integration tests succeeded.',
68+
});
69+
3970

0 commit comments

Comments
 (0)