Skip to content

Commit

Permalink
ci(tests): Fix conclusion status
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasssvaz committed Jul 11, 2024
1 parent 6c2ea9d commit c00b968
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/tests_results.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,18 @@ jobs:
original_action=$(cat ./artifacts/parent-artifacts/action.txt)
original_sha=$(cat ./artifacts/parent-artifacts/sha.txt)
original_ref=$(cat ./artifacts/parent-artifacts/ref.txt)
original_conclusion=$(cat ./artifacts/parent-artifacts/conclusion.txt)
echo "original_event=$original_event" >> $GITHUB_ENV
echo "original_action=$original_action" >> $GITHUB_ENV
echo "original_sha=$original_sha" >> $GITHUB_ENV
echo "original_ref=$original_ref" >> $GITHUB_ENV
echo "original_conclusion=$original_conclusion" >> $GITHUB_ENV
echo "original_event = $original_event"
echo "original_action = $original_action"
echo "original_sha = $original_sha"
echo "original_ref = $original_ref"
echo "original_conclusion = $original_conclusion"
- name: Publish Unit Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
Expand All @@ -59,6 +62,10 @@ jobs:
files: ./artifacts/**/*.xml
action_fail: true

- name: Fail if tests failed
if: ${{ env.original_conclusion == 'failure' || env.original_conclusion == 'timed_out' }}
run: exit 1

- name: Clean up caches
if: always()
uses: actions/github-script@v7
Expand Down
9 changes: 7 additions & 2 deletions .github/workflows/tests_wokwi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,17 @@ jobs:
exit 1
fi
conclusion="${{ github.event.workflow_run.conclusion }}"
printf "$conclusion" >> artifacts/conclusion.txt
printf "\nConclusion = "
cat artifacts/conclusion.txt
echo "pr_num=$pr_num" >> $GITHUB_OUTPUT
echo "ref=$ref" >> $GITHUB_OUTPUT
- name: Download and extract parent hardware results
uses: actions/download-artifact@v4
continue-on-error: true
continue-on-error: ${{ github.event.workflow_run.event != 'schedule' && github.event.workflow_run.event != 'workflow_dispatch' }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
Expand All @@ -107,7 +112,7 @@ jobs:

- name: Download and extract parent QEMU results
uses: actions/download-artifact@v4
continue-on-error: true
continue-on-error: true # Change when QEMU tests are enabled
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ github.event.workflow_run.id }}
Expand Down

0 comments on commit c00b968

Please sign in to comment.