Skip to content

Commit

Permalink
Condense summary
Browse files Browse the repository at this point in the history
  • Loading branch information
kalverra committed Nov 26, 2024
1 parent a01adcb commit 43883e6
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/flakeguard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -316,15 +316,16 @@ jobs:
# Use flakeguard to aggregate all test results
flakeguard aggregate-results --results-path . --output-results ../all_tests.json
cat ../all_tests.md >> $GITHUB_STEP_SUMMARY
# Count all tests
ALL_TESTS_COUNT=$(jq 'length' ../all_tests.json)
ALL_TESTS_COUNT=$(jq '.Results | length' ../all_tests.json)
echo "All tests count: $ALL_TESTS_COUNT"
echo "all_tests_count=$ALL_TESTS_COUNT" >> "$GITHUB_OUTPUT"
# Use flakeguard to filter and output failed tests based on MaxPassRatio
flakeguard aggregate-results --filter-failed=true --max-pass-ratio=${{ inputs.maxPassRatio }} --results-path . --output-results ../failed_tests.json --output-logs ../failed_test_logs.json
cat ../failed_tests.md
cat ../failed_tests.md >> $GITHUB_STEP_SUMMARY
# Count failed tests
if [ -f "../failed_tests.json" ]; then
Expand All @@ -340,13 +341,29 @@ jobs:
echo "failed_tests_count=0" >> "$GITHUB_OUTPUT"
fi
- name: Upload All Tests Summary as Artifact
if: ${{ fromJson(steps.set_test_results.outputs.all_tests_count) > 0 }}
uses: actions/upload-artifact@v4.4.3
with:
path: all_tests.md
name: all-summary.md
retention-days: 7

- name: Upload All Test Results as Artifact
if: ${{ fromJson(steps.set_test_results.outputs.all_tests_count) > 0 }}
uses: actions/upload-artifact@v4.4.3
with:
path: all_tests.json
name: all-test-results.json
retention-days: 7

- name: Upload Failed Tests Summary as Artifact
if: ${{ fromJson(steps.set_test_results.outputs.all_tests_count) > 0 }}
uses: actions/upload-artifact@v4.4.3
with:
path: failed_tests.md
name: failed-summary.md
retention-days: 7

- name: Upload Failed Test Results as Artifact
if: ${{ fromJson(steps.set_test_results.outputs.failed_tests_count) > 0 }}
Expand Down

0 comments on commit 43883e6

Please sign in to comment.