From 038325ccfc8cb59dc5afdf5a9dcce159bec9b115 Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Fri, 2 Oct 2020 15:49:13 +0200 Subject: [PATCH 1/6] add github ci --- .github/workflows/Android-CI.yml | 57 ++++++++++++++++++++++++++++++++ 1 file changed, 57 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..6c5ab42405a --- /dev/null +++ b/.github/workflows/Android-CI.yml @@ -0,0 +1,57 @@ +name: Android CI + +on: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + Build and test native: + 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: Upload reports + uses: actions/upload-artifact@v2 + if: ${{ always() }} + with: + name: reports + path: owncloudApp/build/reports + - name: Upload debug/release build + uses: actions/upload-artifact@v2 + if: ${{ always() }} + with: + name: debug/release build + path: /home/schabi/Projects/owncloud-android/owncloudApp/build/outputs/apk + Test with 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: | + adb logcat -c + adb logcat *:E & + ./gradlew cAT + - uses: actions/upload-artifact@v2 + if: ${{ failure() }} + with: + name: owncloudApp-Espresso-test-report + path: ${{ github.workspace }}/owncloudApp/build/reports/androidTests/connected/* From 9902bf2c2f9b29a38c82036c9a7a76bedcec6ee2 Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Fri, 2 Oct 2020 15:52:20 +0200 Subject: [PATCH 2/6] run always --- .github/workflows/Android-CI.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/Android-CI.yml b/.github/workflows/Android-CI.yml index 6c5ab42405a..c14ad904ad3 100644 --- a/.github/workflows/Android-CI.yml +++ b/.github/workflows/Android-CI.yml @@ -1,9 +1,5 @@ name: Android CI -on: - pull_request: - types: [opened, synchronize, reopened] - jobs: Build and test native: runs-on: ubuntu-latest From d2285d5a6709d8cbfb3906ce3de5a96f2f200b1e Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Fri, 2 Oct 2020 15:53:36 +0200 Subject: [PATCH 3/6] run always --- .github/workflows/Android-CI.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/Android-CI.yml b/.github/workflows/Android-CI.yml index c14ad904ad3..fb6d591900b 100644 --- a/.github/workflows/Android-CI.yml +++ b/.github/workflows/Android-CI.yml @@ -1,5 +1,7 @@ name: Android CI +on: [push] + jobs: Build and test native: runs-on: ubuntu-latest From 26afb1027952cc1bcf84871aa86ffbe9d994546e Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Fri, 2 Oct 2020 15:55:34 +0200 Subject: [PATCH 4/6] fix typo --- .github/workflows/Android-CI.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/Android-CI.yml b/.github/workflows/Android-CI.yml index fb6d591900b..71461806309 100644 --- a/.github/workflows/Android-CI.yml +++ b/.github/workflows/Android-CI.yml @@ -3,7 +3,7 @@ name: Android CI on: [push] jobs: - Build and test native: + Build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 @@ -27,7 +27,7 @@ jobs: with: name: debug/release build path: /home/schabi/Projects/owncloud-android/owncloudApp/build/outputs/apk - Test with Espresso: + Espresso_test: runs-on: macOS-latest steps: - uses: actions/checkout@v2 From 118038a512b0485a1fae349e826df4d10c6da0f9 Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Fri, 2 Oct 2020 16:20:15 +0200 Subject: [PATCH 5/6] try fix artifact upload --- .github/workflows/Android-CI.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/Android-CI.yml b/.github/workflows/Android-CI.yml index 71461806309..e3aabb9d7ea 100644 --- a/.github/workflows/Android-CI.yml +++ b/.github/workflows/Android-CI.yml @@ -20,15 +20,15 @@ jobs: if: ${{ always() }} with: name: reports - path: owncloudApp/build/reports + path: ${{ github.workspace }}/owncloudApp/build/reports - name: Upload debug/release build uses: actions/upload-artifact@v2 if: ${{ always() }} with: name: debug/release build - path: /home/schabi/Projects/owncloud-android/owncloudApp/build/outputs/apk + path: ${{ github.workspace }}/owncloudApp/build/outputs/apk Espresso_test: - runs-on: macOS-latest + runs-on: macos-latest steps: - uses: actions/checkout@v2 with: @@ -38,7 +38,7 @@ jobs: with: java-version: 1.8 - name: Android Emulator test - uses: ReactiveCircus/android-emulator-runner@v2.8.0 + uses: ReactiveCircus/android-emulator-runner@v2.11.0 with: api-level: 28 disable-animations: true @@ -47,7 +47,7 @@ jobs: script: | adb logcat -c adb logcat *:E & - ./gradlew cAT + ./gradlew connectedAndroidTest - uses: actions/upload-artifact@v2 if: ${{ failure() }} with: From 7d3cbe1ef4a255d3ad4ea0bd0811dd0cbcf94f27 Mon Sep 17 00:00:00 2001 From: Christian Schabesberger Date: Fri, 2 Oct 2020 16:41:53 +0200 Subject: [PATCH 6/6] try and fix espresso tests further --- .github/workflows/Android-CI.yml | 15 +++++++++------ .github/workflows/gradle-wrapper-validation.yml | 10 ---------- 2 files changed, 9 insertions(+), 16 deletions(-) delete mode 100644 .github/workflows/gradle-wrapper-validation.yml diff --git a/.github/workflows/Android-CI.yml b/.github/workflows/Android-CI.yml index e3aabb9d7ea..5b11d82937b 100644 --- a/.github/workflows/Android-CI.yml +++ b/.github/workflows/Android-CI.yml @@ -3,6 +3,12 @@ name: Android CI on: [push] jobs: + Wrapper_validation: + name: "Gradlew wrapper validation" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: gradle/wrapper-validation-action@v1 Build: runs-on: ubuntu-latest steps: @@ -20,12 +26,12 @@ jobs: if: ${{ always() }} with: name: reports - path: ${{ github.workspace }}/owncloudApp/build/reports + path: ${{ github.workspace }}/owncloudApp/build - name: Upload debug/release build uses: actions/upload-artifact@v2 if: ${{ always() }} with: - name: debug/release build + name: builds path: ${{ github.workspace }}/owncloudApp/build/outputs/apk Espresso_test: runs-on: macos-latest @@ -44,10 +50,7 @@ jobs: disable-animations: true arch: x86_64 profile: Nexus 6 - script: | - adb logcat -c - adb logcat *:E & - ./gradlew connectedAndroidTest + script: ./gradlew connectedAndroidTest - uses: actions/upload-artifact@v2 if: ${{ failure() }} with: diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml deleted file mode 100644 index f365456a1e3..00000000000 --- a/.github/workflows/gradle-wrapper-validation.yml +++ /dev/null @@ -1,10 +0,0 @@ -name: "Validate Gradle Wrapper" -on: [pull_request] - -jobs: - validation: - name: "Validation" - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - uses: gradle/wrapper-validation-action@v1