Skip to content

[docs] Add 'isNew' metadata item and improve linting instructions in … #2

[docs] Add 'isNew' metadata item and improve linting instructions in …

[docs] Add 'isNew' metadata item and improve linting instructions in … #2

name: Android Unit Tests
on:
workflow_dispatch: {}
push:
branches: [main]
paths:
- .github/workflows/android-unit-tests.yml
- apps/expo-go/android/**
- fastlane/**
- packages/**/android/**
- tools/**
- yarn.lock
- '!packages/@expo/cli/**'
pull_request:
paths:
- .github/workflows/android-unit-tests.yml
- apps/expo-go/android/**
- fastlane/**
- packages/**/android/**
- tools/**
- 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: 100
env:
ORG_GRADLE_PROJECT_reactNativeArchitectures: x86_64
GRADLE_OPTS: -Dorg.gradle.jvmargs=-Xmx3072m -XX:MaxMetaspaceSize=1024m
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:
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 Spotless lint check
working-directory: apps/expo-go/android
run: ./gradlew spotlessCheck || { echo '::error Spotless lint failed. Run `./gradlew spotlessApply` from `apps/expo-go/android` to automatically fix formatting.' && exit 1; }
- name: 🎸 Run native Android unit tests
if: always()
timeout-minutes: 30
run: expotools native-unit-tests --platform android
- name: 💾 Save test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: packages/**/build/test-results/**/*xml