From 05e0414a47e662405b30309b10ec14ddbf929577 Mon Sep 17 00:00:00 2001 From: Hannes Achleitner Date: Sun, 16 Feb 2020 08:50:21 +0100 Subject: [PATCH 1/2] Github CI with action --- .github/workflows/Android-CI.yml | 47 ++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/Android-CI.yml diff --git a/.github/workflows/Android-CI.yml b/.github/workflows/Android-CI.yml new file mode 100644 index 00000000000..1e7a2d03ffd --- /dev/null +++ b/.github/workflows/Android-CI.yml @@ -0,0 +1,47 @@ +name: Android CI + +on: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + Build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Build with Gradle + run: ./gradlew build + - name: Archive App Lint report + uses: actions/upload-artifact@v1 + with: + name: Owncloud-Lint-report + path: lint-app-report.html + Espresso: + runs-on: macOS-latest + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Android Emulator test + uses: ReactiveCircus/android-emulator-runner@v2.8.0 + with: + api-level: 28 + disable-animations: true + arch: x86_64 + profile: Nexus 6 + script: ./gradlew cAT + - uses: actions/upload-artifact@v1 + if: failure() + with: + name: owncloudApp-Espresso-test-report + path: ./**/build/reports/androidTests/connected/* From 722bdfc24618551ea9de59e683399715b5010e52 Mon Sep 17 00:00:00 2001 From: Hannes Achleitner Date: Sat, 23 May 2020 09:10:58 +0200 Subject: [PATCH 2/2] print logcat errors --- .github/workflows/Android-CI.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/Android-CI.yml b/.github/workflows/Android-CI.yml index 1e7a2d03ffd..2a24126f623 100644 --- a/.github/workflows/Android-CI.yml +++ b/.github/workflows/Android-CI.yml @@ -39,9 +39,12 @@ jobs: disable-animations: true arch: x86_64 profile: Nexus 6 - script: ./gradlew cAT - - uses: actions/upload-artifact@v1 + script: | + adb logcat -c + adb logcat *:E & + ./gradlew cAT + - uses: actions/upload-artifact@v2 if: failure() with: name: owncloudApp-Espresso-test-report - path: ./**/build/reports/androidTests/connected/* + path: ${{ github.workspace }}/owncloudApp/build/reports/androidTests/connected/*