Skip to content

Commit

Permalink
adding github step summary
Browse files Browse the repository at this point in the history
  • Loading branch information
maxeeem committed Jan 24, 2024
1 parent 394b69d commit d2d9091
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/python-app-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,11 @@ jobs:
- name: Extract number of failures and errors
id: extract_results
run: |
echo "test_dev=$(tail -2 ../output-dev.txt | head -1)" >> "$GITHUB_ENV"
echo "test_pr=$(tail -2 ../output-pr.txt | head -1)" >> "$GITHUB_ENV"
echo "test_dev=$(tail -2 output-dev.txt | head -1)" >> "$GITHUB_ENV"
echo "test_pr=$(tail -2 output-pr.txt | head -1)" >> "$GITHUB_ENV"
echo 'test_results<<EOF'
diff -u output-dev.txt output-pr.txt
echo EOF
- name: Setup Node (for diff)
uses: actions/setup-node@v4
Expand All @@ -56,18 +59,22 @@ jobs:
- name: Compare test results
run: |
diff -u output-dev.txt output-pr.txt | diff2html -i stdin -F test-diff.html
echo "```diff" >> $GITHUB_STEP_SUMMARY
echo "$test_results" >> $GITHUB_STEP_SUMMARY
echo "```" >> $GITHUB_STEP_SUMMARY
- uses: actions/upload-artifact@v4
with:
name: test-diff
path: ./test-diff.html

- name: Comment PR with execution number
- name: Comment on the PR
uses: thollander/[email protected]
with:
message: |
Test results from DEV: "$test_dev"
Test results from PR: "$test_pr"
$GITHUB_STEP_SUMMARY
comment_tag: execution


0 comments on commit d2d9091

Please sign in to comment.