From a87f955126168c0694cd9a01ce5f2ca8e747fd52 Mon Sep 17 00:00:00 2001 From: "Loren M. Lang" Date: Sun, 2 Jan 2022 20:56:55 -0800 Subject: [PATCH] Save test reports on failure and upload APK on success --- .github/workflows/android.yml | 17 ++++++++++++++++- README.md | 2 +- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.github/workflows/android.yml b/.github/workflows/android.yml index 12b2936..b22a2af 100644 --- a/.github/workflows/android.yml +++ b/.github/workflows/android.yml @@ -5,6 +5,7 @@ on: branches: [ '**' ] pull_request: branches: [ '**' ] + workflow_dispatch: jobs: compile: @@ -75,6 +76,13 @@ jobs: run: ./gradlew lint --stacktrace continue-on-error: true + - name: Upload reports + uses: actions/upload-artifact@v2 + with: + name: Unit Test Reports + path: build/outputs/reports + if: ${{ failure() }} + instrumentation: name: "Testing on API ${{ matrix.api-level }} for ${{ matrix.target }}" needs: compile @@ -83,7 +91,7 @@ jobs: strategy: fail-fast: false matrix: - api-level: [ 15, 19, 24, 30 ] + api-level: [ 15, 20, 24, 30 ] target: [ default, google_apis ] steps: @@ -114,3 +122,10 @@ jobs: arch: x86 profile: Nexus 6 script: ./gradlew connectedCheck --stacktrace + + - name: Save successful debug APK + uses: actions/upload-artifact@v2 + with: + name: debug apk + path: build/outputs/debug/aprsdroid-debug.apk + if: ${{ matrix.api-level == 30 && matrix.target == 'google_apis' }} diff --git a/README.md b/README.md index afe7afb..64a9af5 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ messages. APRSdroid is Open Source Software written in Scala and licensed under the GPLv2. -![Android CI](../../actions/workflows/android/badge.svg) +[![Android CI](../../actions/workflows/android.yml/badge.svg)](../../actions/workflows/android.yml) Quick links: