Skip to content

Commit

Permalink
chore: report failed unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jacek-marchwicki committed Oct 13, 2023
1 parent 516577f commit 495e6df
Showing 1 changed file with 20 additions and 4 deletions.
24 changes: 20 additions & 4 deletions .github/workflows/run-unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

permissions: read-all
permissions:
contents: read
actions: read
checks: write

jobs:
unit-tests:
Expand All @@ -26,9 +29,22 @@ jobs:

- name: Run test
run: ./gradlew test
env:
GITHUB_USER: ${{ github.actor }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Test Report
uses: dorny/test-reporter@v1
if: success() || failure() # run this step even if previous step failed
with:
name: JEST Tests
path: "*/build/test-results/**/*.xml"
reporter: java-junit

- name: Upload failed tests results
if: failure()
uses: actions/upload-artifact@v3
with:
name: failed-tests-results
path: |
*/build/reports/**
- name: Include Slack Notification
if: failure() && (github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master')
Expand Down

0 comments on commit 495e6df

Please sign in to comment.