Skip to content

Commit

Permalink
Merge branch 'main' into willdavsmith/fork-functional-test-4
Browse files Browse the repository at this point in the history
  • Loading branch information
willdavsmith authored Mar 11, 2024
2 parents 75ffaee + 25aa4f0 commit f6e3a27
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/functional-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -653,20 +653,24 @@ jobs:
app_id: ${{ env.FUNCTIONAL_TEST_APP_ID }}
private_key: ${{ secrets.FUNCTIONAL_TEST_APP_PRIVATE_KEY }}
- name: Get tests job status
run: |
id: get_test_status
run: |
TEST_STATUS=failure # default to failure
# from: https://github.com/orgs/community/discussions/26526#discussioncomment-3252209
jobstatus=$(curl -X GET -s -u "admin:${{ steps.get_installation_token.outputs.token }}" https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/jobs | jq ".jobs[] | {job_status: .conclusion, matrix: .name}")
# if jobstatus contains failure
if echo "$jobstatus" | grep -q "failure"; then
echo "TEST_STATUS=failure" >> $GITHUB_ENV
TEST_STATUS=failure
elif echo "$jobstatus" | grep -q "cancelled"; then
echo "TEST_STATUS=cancelled" >> $GITHUB_ENV
TEST_STATUS=cancelled
else
echo "TEST_STATUS=success" >> $GITHUB_ENV
# if no failures, then it's a success
TEST_STATUS=success
fi
echo "Test Status: $jobstatus"
echo "Setting test status to $TEST_STATUS"
echo "Test Status: $TEST_STATUS"
echo "test_status=$TEST_STATUS" >> $GITHUB_ENV
- uses: LouisBrunner/checks-action@v1.6.1
if: always()
with:
Expand All @@ -675,7 +679,7 @@ jobs:
repo: ${{ github.repository }}
sha: ${{ env.CHECKOUT_REF }}
status: completed
conclusion: ${{ env.TEST_STATUS }}
conclusion: ${{ steps.get_test_status.outputs.test_status }}
output: |
{"summary":"Functional Test run completed. See links for more information.","title":"Functional Test Run"}
details_url: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
Expand Down

0 comments on commit f6e3a27

Please sign in to comment.