ci(github): android tests: fix packages syntax #10
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: Mobile Android Tests | ||
on: | ||
push: | ||
branches: [main, master] | ||
pull_request: | ||
branches: [master] | ||
env: | ||
ANDROID_ARCH: x86_64 | ||
ANDROID_TARGET: google_apis_playstore | ||
API_LEVEL: 34 | ||
EMULATOR_NAME: Pixel_7_API_34_x86 | ||
ANDROID_SDK_PACKAGES: tools platfrom-tools emulator system-images;android-34;google_apis_playstore;x86_64 platforms;android-34 build-tools;34.0.0 | ||
jobs: | ||
build: | ||
name: Android Test | ||
runs-on: macOS-latest | ||
defaults: | ||
run: | ||
working-directory: ./mobile | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Node | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
java-version: "17" | ||
distribution: "temurin" | ||
- name: Setup Android SDK | ||
uses: android-actions/setup-android@v3 | ||
with: | ||
packages: ${{ ANDROID_SDK_PACKAGES }} | ||
Check failure on line 36 in .github/workflows/mobile-android-tests.yml GitHub Actions / Mobile Android TestsInvalid workflow file
|
||
- name: Build emulator | ||
run: | | ||
echo "no" | avdmanager --verbose create avd --force -n $EMULATOR_NAME --abi "${ANDROID_TARGET}/${ANDROID_ARCH}" -k "system-images;android-${API_LEVEL};${ANDROID_TARGET};${ANDROID_ARCH}" | ||
- name: Install dependencies | ||
run: npm ci | ||
- name: Run Detox Build | ||
run: | | ||
chmod +x android/gradlew | ||
npx detox build --configuration android.emu.debug | ||
- name: Run Detox Test | ||
run: | | ||
npx expo start & | ||
npx detox test --configuration android.emu.debug |