Add badges to README #29
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] | |
paths: | |
- mobile/** | |
pull_request: | |
branches: [master] | |
paths: | |
- mobile/** | |
env: | |
ANDROID_ARCH: x86_64 | |
ANDROID_TARGET: google_apis_playstore | |
API_LEVEL: 34 | |
EMULATOR_NAME: Pixel_7_API_34_x86 | |
ANDROID_SDK_PACKAGES: tools platform-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: ubuntu-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: ${{env.ANDROID_SDK_PACKAGES}} | |
- 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}" | |
avdmanager list avd | |
- 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 |