Skip to content

Commit 41b0c74

Browse files
committed
Create a check in the github checks list to show ATEX Testing progress.
1 parent c51e5be commit 41b0c74

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/atex-test.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ permissions:
1717
contents: read
1818
actions: read
1919
pull-requests: write
20+
checks: write
2021

2122
jobs:
2223
# Only run if the build workflow succeeded
@@ -26,6 +27,7 @@ jobs:
2627
outputs:
2728
pr_number: ${{ steps.get_pr.outputs.pr_number }}
2829
pr_sha: ${{ steps.get_pr.outputs.pr_sha }}
30+
check_id: ${{ steps.create_check.outputs.check_id }}
2931
steps:
3032
- name: Download PR info
3133
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
@@ -45,6 +47,18 @@ jobs:
4547
echo "PR Number: ${PR_NUMBER}"
4648
echo "PR SHA: ${PR_SHA}"
4749
50+
- name: Create GitHub check run
51+
uses: LouisBrunner/checks-action@5f926e0abf5a74499b1e505f8d10e0f8e0624208 # v2.1.0
52+
id: create_check
53+
with:
54+
token: ${{ secrets.GITHUB_TOKEN }}
55+
name: ATEX - Test and Upload Results
56+
status: in_progress
57+
sha: ${{ steps.get_pr.outputs.pr_sha }}
58+
details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
59+
output: |
60+
{"summary":"Running ATEX tests on CentOS Stream 8, 9, and 10","title":"ATEX Testing in Progress"}
61+
4862
test:
4963
name: Test on CentOS Stream ${{ matrix.centos_stream_major }}
5064
runs-on: ubuntu-latest
@@ -270,6 +284,7 @@ jobs:
270284
Test artifacts have been submitted to Testing Farm.
271285
272286
**Results:** [View Test Results](${{ steps.testing_farm_request.outputs.HTML_LINK }})
287+
**Workflow Run:** [View Workflow Details](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})
273288
274289
_This comment was automatically generated by the ATEX workflow._
275290
edit-mode: replace
@@ -282,3 +297,16 @@ jobs:
282297
PR_NUMBER: ${{ needs.check_build.outputs.pr_number }}
283298
run: |
284299
git push --delete origin PR${PR_NUMBER}
300+
301+
- name: Update GitHub check run
302+
if: always()
303+
uses: LouisBrunner/checks-action@5f926e0abf5a74499b1e505f8d10e0f8e0624208 # v2.1.0
304+
with:
305+
token: ${{ secrets.GITHUB_TOKEN }}
306+
check_id: ${{ needs.check_build.outputs.check_id }}
307+
sha: ${{ needs.check_build.outputs.pr_sha }}
308+
status: completed
309+
conclusion: ${{ job.status }}
310+
details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
311+
output: |
312+
{"summary":"ATEX tests completed. View results: ${{ steps.testing_farm_request.outputs.HTML_LINK }}","title":"ATEX Testing Complete"}

0 commit comments

Comments
 (0)