add basic e2e tests for Metro web Fast Refresh #9705
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Android Instrumentation Tests | |
on: | |
workflow_dispatch: {} | |
push: | |
branches: [main] | |
paths: | |
- .github/workflows/android-instrumentation-tests.yml | |
- apps/expo-go/android/** | |
- fastlane/** | |
# - packages/**/android/** | |
- packages/expo-eas-client/android/** | |
- packages/expo-json-utils/android/** | |
- packages/expo-manifests/android/** | |
- packages/expo-updates/android/** | |
- tools/src/commands/AndroidNativeUnitTests.ts | |
- yarn.lock | |
- '!packages/@expo/cli/**' | |
pull_request: | |
paths: | |
- .github/workflows/android-instrumentation-tests.yml | |
- apps/expo-go/android/** | |
- fastlane/** | |
# - packages/**/android/** | |
- packages/expo-eas-client/android/** | |
- packages/expo-json-utils/android/** | |
- packages/expo-manifests/android/** | |
- packages/expo-updates/android/** | |
- tools/src/commands/AndroidNativeUnitTests.ts | |
- yarn.lock | |
- '!packages/@expo/cli/**' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test: | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 150 | |
env: | |
ORG_GRADLE_PROJECT_reactNativeArchitectures: x86_64 | |
GRADLE_OPTS: -Dorg.gradle.jvmargs=-Xmx2048m -XX:MaxMetaspaceSize=1024m | |
strategy: | |
matrix: | |
api-level: [33] | |
steps: | |
- name: ⬢ Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: 👀 Check out repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: 🧹 Cleanup GitHub Linux runner disk space | |
uses: ./.github/actions/cleanup-linux-disk-space | |
- name: 🔨 Use JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: ♻️ Restore caches | |
uses: ./.github/actions/expo-caches | |
id: expo-caches | |
with: | |
gradle: 'true' | |
yarn-workspace: 'true' | |
yarn-tools: 'true' | |
react-native-gradle-downloads: 'true' | |
- name: ➕ Add `bin` to GITHUB_PATH | |
run: echo "$(pwd)/bin" >> $GITHUB_PATH | |
- name: 🧶 Install node modules in root dir | |
if: steps.expo-caches.outputs.yarn-workspace-hit != 'true' | |
run: yarn install --frozen-lockfile | |
- name: 📱 Run instrumented unit tests | |
timeout-minutes: 80 | |
uses: ./.github/actions/use-android-emulator | |
with: | |
avd-api: ${{ matrix.api-level }} | |
avd-name: avd-${{ matrix.api-level }} | |
script: expotools android-native-unit-tests --type instrumented | |
- name: 💾 Save test results | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: test-results | |
path: packages/**/build/outputs/androidTest-results/**/* |