Skip to content

Commit

Permalink
fix test reports
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiuosvat committed Aug 21, 2024
1 parent db4b5da commit f9b2581
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,14 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v3

- name: Run Tests and Capture Output
- name: Capture Test Output
run: |
mkdir -p test-results
cargo test -- --format=json > test-results/output.json
cargo test -- --nocapture > test-results/output.txt
- name: Generate Summary
run: |
echo "## Test Results" >> $GITHUB_STEP_SUMMARY
echo "| Test Name | Result |" >> $GITHUB_STEP_SUMMARY
echo "|-----------|--------|" >> $GITHUB_STEP_SUMMARY
cat test-results/output.json | jq -r '.test_results[] | "| \(.name) | \(.status) |"' >> $GITHUB_STEP_SUMMARY
grep "^test" test-results/output.txt | awk '{print "| " $2 " | " ($3=="ok" ? "passed" : "**FAILED**") " |"}' >> $GITHUB_STEP_SUMMARY

0 comments on commit f9b2581

Please sign in to comment.