1
0
Code Issues Pull Requests Packages Projects Releases Wiki Activity GitHub Gitee
react-native-pushy/.github/workflows/e2e_android.yml

50 lines
1.3 KiB
YAML
Raw Normal View History

2023-03-31 21:35:25 +08:00
name: e2e-android
on: push
2023-03-16 11:31:27 +08:00
jobs:
2023-03-31 21:35:25 +08:00
e2e-android:
runs-on: macos-latest
2023-03-31 22:01:53 +08:00
steps:
- name: Checkout repository
uses: actions/checkout@v3
2023-03-31 22:01:16 +08:00
2023-03-31 22:03:42 +08:00
- name: Setup Node.js
uses: actions/setup-node@v3
with:
cache: yarn
node-version-file: .nvmrc
- name: Install Yarn dependencies
run: yarn --frozen-lockfile --prefer-offline
- name: Setup Java
uses: actions/setup-java@v3
with:
cache: gradle
distribution: temurin
java-version: 17
- name: Cache Detox build
id: cache-detox-build
uses: actions/cache@v3
with:
path: android/app/build
key: ${{ runner.os }}-detox-build
restore-keys: |
${{ runner.os }}-detox-build
- name: Detox build
2023-04-03 11:21:15 +08:00
run: yarn build:android-debug
2023-03-16 11:31:27 +08:00
2023-03-31 21:35:25 +08:00
- name: Get device name
id: device
2023-04-02 13:25:58 +08:00
run: node -e "console.log('AVD_NAME=' + require('./Example/testHotUpdate/.detoxrc').devices.emulator.device.avdName)" >> $GITHUB_OUTPUT
2023-03-16 11:31:27 +08:00
2023-03-31 21:35:25 +08:00
- name: Detox test
2023-03-16 11:31:27 +08:00
uses: reactivecircus/android-emulator-runner@v2
with:
2023-03-31 21:35:25 +08:00
api-level: 31
arch: x86_64
avd-name: ${{ steps.device.outputs.AVD_NAME }}
2023-04-03 11:21:15 +08:00
script: yarn test:android-debug