1name: Android Instrumentation Tests 2 3on: 4 workflow_dispatch: {} 5 push: 6 branches: [master] 7 paths: 8 - .github/workflows/android-instrumentation-tests.yml 9 - 'fastlane/**' 10 - 'packages/**/android/**' 11 - 'tools/**' 12 - yarn.lock 13 pull_request: 14 branches: [master] 15 paths: 16 - .github/workflows/android-instrumentation-tests.yml 17 - 'fastlane/**' 18 - 'packages/**/android/**' 19 - 'tools/**' 20 - yarn.lock 21 22jobs: 23 test: 24 runs-on: macos-latest 25 steps: 26 - name: Check out repository 27 uses: actions/checkout@v2 28 with: 29 submodules: true 30 - name: Get yarn cache directory path 31 id: yarn-cache-dir-path 32 run: echo "::set-output name=dir::$(yarn cache dir)" 33 - uses: actions/cache@v2 34 with: 35 path: ${{ steps.yarn-cache-dir-path.outputs.dir }} 36 key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }} 37 restore-keys: | 38 ${{ runner.os }}-yarn- 39 - run: yarn install --frozen-lockfile 40 - uses: actions/cache@v2 41 with: 42 path: ~/.gradle/caches 43 key: ${{ runner.os }}-gradle-${{ hashFiles('android/*.gradle*') }} 44 restore-keys: | 45 ${{ runner.os }}-gradle- 46 - name: Run instrumented unit tests 47 uses: reactivecircus/android-emulator-runner@v2 48 with: 49 api-level: 29 50 script: ./bin/expotools android-native-unit-tests --type instrumented 51