Skip to content

Commit

Permalink
gha: test results are displayed under the workflow run
Browse files Browse the repository at this point in the history
  • Loading branch information
andrsd committed Jan 4, 2025
1 parent 7f5d732 commit 8572ed8
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,19 @@ jobs:
run: make -C ${{ github.workspace }}/build

- name: Run tests
run: make -C ${{ github.workspace }}/build test ARGS='-V'
run: |
echo "### Test results" >> $GITHUB_STEP_SUMMARY
ctest --test-dir ${{ github.workspace }}/build -O test.log
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
awk 's;/^\[HANDLER_OUTPUT\]/{s=1}' test.log >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
- name: Upload test result
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results-${{ matrix.os }}
path: ${{ github.workspace }}/build/Testing/Temporary/LastTest.log

- name: Generate code coverage
run: make -C ${{ github.workspace }}/build coverage
Expand Down

0 comments on commit 8572ed8

Please sign in to comment.