|
| 1 | +name: iosched |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + - compose |
| 8 | + - main_gha |
| 9 | + |
| 10 | +jobs: |
| 11 | + build: |
| 12 | + runs-on: ubuntu-latest |
| 13 | + timeout-minutes: 30 |
| 14 | + |
| 15 | + steps: |
| 16 | + - name: Checkout |
| 17 | + uses: actions/checkout@v2 |
| 18 | + |
| 19 | + - name: Copy CI gradle.properties |
| 20 | + run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties |
| 21 | + |
| 22 | + - name: Set up JDK 11 |
| 23 | + uses: actions/setup-java@v1 |
| 24 | + with: |
| 25 | + java-version: 11 |
| 26 | + |
| 27 | + - uses: actions/cache@v2 |
| 28 | + with: |
| 29 | + path: | |
| 30 | + ~/.gradle/caches/modules-* |
| 31 | + ~/.gradle/caches/jars-* |
| 32 | + ~/.gradle/caches/build-cache-* |
| 33 | + key: gradle-${{ hashFiles('checksum.txt') }} |
| 34 | + |
| 35 | + - name: Build project |
| 36 | + run: ./gradlew spotlessCheck assembleDebug --stacktrace |
| 37 | + |
| 38 | + - name: Upload build reports |
| 39 | + if: always() |
| 40 | + uses: actions/upload-artifact@v2 |
| 41 | + with: |
| 42 | + name: build-reports |
| 43 | + path: mobile/build/reports |
| 44 | + |
| 45 | + test: |
| 46 | + needs: build |
| 47 | + runs-on: macOS-latest # enables hardware acceleration in the virtual machine |
| 48 | + timeout-minutes: 30 |
| 49 | + strategy: |
| 50 | + matrix: |
| 51 | + api-level: [23, 26, 29] |
| 52 | + |
| 53 | + steps: |
| 54 | + - name: Checkout |
| 55 | + uses: actions/checkout@v2 |
| 56 | + |
| 57 | + - name: Copy CI gradle.properties |
| 58 | + run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties |
| 59 | + |
| 60 | + - name: Set up JDK 11 |
| 61 | + uses: actions/setup-java@v1 |
| 62 | + with: |
| 63 | + java-version: 11 |
| 64 | + |
| 65 | + - name: Run instrumentation tests |
| 66 | + uses: reactivecircus/android-emulator-runner@v2 |
| 67 | + with: |
| 68 | + api-level: ${{ matrix.api-level }} |
| 69 | + arch: x86 |
| 70 | + disable-animations: true |
| 71 | + script: ./gradlew mobile:cAT --stacktrace |
| 72 | + |
| 73 | + - name: Upload test reports |
| 74 | + if: always() |
| 75 | + uses: actions/upload-artifact@v2 |
| 76 | + with: |
| 77 | + name: test-reports |
| 78 | + path: mobile/build/reports |
0 commit comments