diff --git a/.github/workflows/Android-CI.yml b/.github/workflows/Android-CI.yml new file mode 100644 index 00000000000..2a24126f623 --- /dev/null +++ b/.github/workflows/Android-CI.yml @@ -0,0 +1,50 @@ +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: | + 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/*