Skip to content

Commit cba822c

Browse files
committed
Update test.yml
1 parent 1788e98 commit cba822c

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

.github/workflows/test.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,25 @@ jobs:
9898

9999
- name: Test
100100
run: gradle test && gradle jacocoTestReport
101+
continue-on-error: true
102+
103+
- name: Archive test reports if tests fail
104+
if: failure()
105+
run: |
106+
zip -r test-reports.zip build/reports/tests/test
107+
echo "##[error]Tests failed, see the report"
108+
continue-on-error: false
109+
110+
- name: Upload Test Reports
111+
if: failure()
112+
uses: actions/upload-artifact@v3
113+
with:
114+
name: test-reports
115+
path: test-reports.zip
116+
117+
- name: Fail the job if tests failed
118+
if: failure()
119+
run: exit 1
101120

102121
- name: Codecov
103122
run: bash <(curl -s https://codecov.io/bash) -t ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)