Upload test report as artifact on failure (mihonapp/mihon#2664)
(cherry picked from commit 9f9155121cb2fa75c9b2c9a2796f3a1dac6b15e7)
This commit is contained in:
parent
b927dd2fed
commit
1a40ab5114
2 changed files with 16 additions and 0 deletions
8
.github/workflows/build_pull_request.yml
vendored
8
.github/workflows/build_pull_request.yml
vendored
|
|
@ -77,8 +77,16 @@ jobs:
|
||||||
run: ./gradlew assemblePreview
|
run: ./gradlew assemblePreview
|
||||||
|
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
|
id: unit_tests
|
||||||
run: ./gradlew testReleaseUnitTest
|
run: ./gradlew testReleaseUnitTest
|
||||||
|
|
||||||
|
- name: Upload test report
|
||||||
|
if: steps.unit_tests.outcome == 'failure'
|
||||||
|
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
|
||||||
|
with:
|
||||||
|
name: test-report-${{ github.sha }}
|
||||||
|
path: app/build/reports/tests/testReleaseUnitTest
|
||||||
|
|
||||||
- name: Sign APK
|
- name: Sign APK
|
||||||
if: github.repository == github.event.pull_request.head.repo.full_name
|
if: github.repository == github.event.pull_request.head.repo.full_name
|
||||||
uses: r0adkll/sign-android-release@f30bdd30588842ac76044ecdbd4b6d0e3e813478
|
uses: r0adkll/sign-android-release@f30bdd30588842ac76044ecdbd4b6d0e3e813478
|
||||||
|
|
|
||||||
8
.github/workflows/build_push.yml
vendored
8
.github/workflows/build_push.yml
vendored
|
|
@ -61,8 +61,16 @@ jobs:
|
||||||
run: ./gradlew assemblePreview -Pinclude-telemetry -Penable-updater
|
run: ./gradlew assemblePreview -Pinclude-telemetry -Penable-updater
|
||||||
|
|
||||||
- name: Run unit tests
|
- name: Run unit tests
|
||||||
|
id: unit_tests
|
||||||
run: ./gradlew testReleaseUnitTest
|
run: ./gradlew testReleaseUnitTest
|
||||||
|
|
||||||
|
- name: Upload test report
|
||||||
|
if: steps.unit_tests.outcome == 'failure'
|
||||||
|
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
|
||||||
|
with:
|
||||||
|
name: test-report-${{ github.sha }}
|
||||||
|
path: app/build/reports/tests/testReleaseUnitTest
|
||||||
|
|
||||||
- name: Sign APK
|
- name: Sign APK
|
||||||
uses: r0adkll/sign-android-release@f30bdd30588842ac76044ecdbd4b6d0e3e813478
|
uses: r0adkll/sign-android-release@f30bdd30588842ac76044ecdbd4b6d0e3e813478
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue