[docs] Add 'isNew' metadata item and improve linting instructions in … #2
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: Test Suite | |
on: | |
workflow_dispatch: {} | |
push: | |
branches: [main, 'sdk-*'] | |
paths: | |
- .github/workflows/test-suite.yml | |
- apps/bare-expo/** | |
- apps/test-suite/** | |
- packages/** | |
- yarn.lock | |
pull_request: | |
paths: | |
- .github/workflows/test-suite.yml | |
- apps/bare-expo/** | |
- apps/test-suite/** | |
- packages/** | |
- yarn.lock | |
# Ignore Expo CLI for now... | |
- '!packages/@expo/cli/**' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
ios-build: | |
runs-on: macos-15 | |
steps: | |
- name: 👀 Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: 🔨 Switch to Xcode 16.0 | |
run: sudo xcode-select --switch /Applications/Xcode_16.0.app | |
- name: 🍺 Install required tools | |
run: | | |
brew install watchman || true | |
- name: ➕ Add `bin` to GITHUB_PATH | |
run: echo "$(pwd)/bin" >> $GITHUB_PATH | |
- name: 💎 Setup Ruby and install gems | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
ruby-version: 3.2.2 | |
- name: ♻️ Restore caches | |
uses: ./.github/actions/expo-caches | |
id: expo-caches | |
with: | |
yarn-workspace: 'true' | |
yarn-tools: 'true' | |
bare-expo-pods: 'true' | |
- name: 🧶 Install node modules in root dir | |
if: steps.expo-caches.outputs.yarn-workspace-hit != 'true' | |
run: yarn install --frozen-lockfile | |
- name: 🕵️ Debug CocoaPods lockfiles | |
run: git diff Podfile.lock Pods/Manifest.lock | |
working-directory: apps/bare-expo/ios | |
continue-on-error: true | |
- name: ⚛️ Display React Native config | |
run: yarn expo-modules-autolinking react-native-config --platform ios | |
working-directory: apps/bare-expo | |
- name: 🌳 Display pod environment | |
run: pod env | |
working-directory: apps/bare-expo/ios | |
- name: 🥥 Install pods in apps/bare-expo/ios | |
if: steps.expo-caches.outputs.ios-pods-hit != 'true' | |
run: pod install | |
working-directory: apps/bare-expo/ios | |
- name: 🏗️ Build iOS project | |
run: ./scripts/start-ios-e2e-test.ts --build | |
working-directory: apps/bare-expo | |
timeout-minutes: 55 | |
env: | |
EXPO_DEBUG: 1 | |
NODE_ENV: production | |
- name: 📸 Upload builds | |
uses: actions/upload-artifact@v4 | |
with: | |
name: bare-expo-ios-builds | |
path: apps/bare-expo/ios/build/BareExpo.app | |
- name: 🔔 Notify on Slack | |
uses: 8398a7/action-slack@v3 | |
if: failure() && (github.event.ref == 'refs/heads/main' || startsWith(github.event.ref, 'refs/heads/sdk-')) | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SLACK_WEBHOOK_URL: ${{ secrets.slack_webhook_ios }} | |
with: | |
channel: '#expo-ios' | |
status: ${{ job.status }} | |
fields: job,message,ref,eventName,author,took | |
author_name: Test Suite (iOS) | |
ios-test: | |
needs: ios-build | |
runs-on: macos-15 | |
steps: | |
- name: 👀 Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: ➕ Add `bin` to GITHUB_PATH | |
run: echo "$(pwd)/bin" >> $GITHUB_PATH | |
- name: 🌠 Download builds | |
uses: actions/download-artifact@v4 | |
with: | |
name: bare-expo-ios-builds | |
path: apps/bare-expo/ios/build/BareExpo.app | |
- name: 🍺 Install Maestro | |
run: | | |
curl -Ls "https://get.maestro.mobile.dev" | bash | |
brew tap facebook/fb | |
brew install facebook/fb/idb-companion | |
echo "${HOME}/.maestro/bin" >> $GITHUB_PATH | |
# env: | |
# MAESTRO_VERSION: '1.33.1' | |
- name: ♻️ Restore caches | |
uses: ./.github/actions/expo-caches | |
id: expo-caches | |
with: | |
yarn-workspace: 'true' | |
- name: 🧶 Install node modules in root dir | |
if: steps.expo-caches.outputs.yarn-workspace-hit != 'true' | |
run: yarn install --frozen-lockfile | |
- name: 🧪 Run tests | |
run: ./scripts/start-ios-e2e-test.ts --test | |
working-directory: apps/bare-expo | |
timeout-minutes: 30 | |
- name: Store testing artifacts | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: bare-expo-artifacts-ios | |
path: | | |
~/.maestro/tests/**/* | |
~/Library/Logs/maestro/**/* | |
overwrite: true | |
- name: 🔔 Notify on Slack | |
uses: 8398a7/action-slack@v3 | |
if: failure() && (github.event.ref == 'refs/heads/main' || startsWith(github.event.ref, 'refs/heads/sdk-')) | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SLACK_WEBHOOK_URL: ${{ secrets.slack_webhook_ios }} | |
with: | |
channel: '#expo-ios' | |
status: ${{ job.status }} | |
fields: job,message,ref,eventName,author,took | |
author_name: Test Suite (iOS) | |
android-build: | |
runs-on: ubuntu-22.04 | |
env: | |
ORG_GRADLE_PROJECT_reactNativeArchitectures: x86_64 | |
GRADLE_OPTS: -Dorg.gradle.jvmargs="-Xmx4096m -XX:MaxMetaspaceSize=4096m" | |
steps: | |
- name: 👀 Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: 🧹 Cleanup GitHub Linux runner disk space | |
uses: ./.github/actions/cleanup-linux-disk-space | |
- name: ⬢ Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: 🔨 Use JDK 17 | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: ➕ Add `bin` to GITHUB_PATH | |
run: echo "$(pwd)/bin" >> $GITHUB_PATH | |
- 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: 🧶 Install workspace node modules | |
if: steps.expo-caches.outputs.yarn-workspace-hit != 'true' | |
run: yarn install --frozen-lockfile | |
- name: ⚛️ Display React Native config | |
run: yarn expo-modules-autolinking react-native-config --platform android | |
working-directory: apps/bare-expo | |
- name: 🛠️ Generate dynamic macros | |
run: expotools android-generate-dynamic-macros --configuration release --bare | |
- name: 🏗️ Build Android project | |
run: ./gradlew -DtestBuildType=release :app:assembleRelease :app:assembleAndroidTest --no-daemon | |
working-directory: apps/bare-expo/android | |
timeout-minutes: 35 | |
env: | |
EXPO_DEBUG: 1 | |
NODE_ENV: production | |
- name: 📸 Upload builds | |
uses: actions/upload-artifact@v4 | |
with: | |
name: bare-expo-android-builds | |
path: apps/bare-expo/android/app/build/outputs/apk | |
- name: 🔔 Notify on Slack | |
uses: 8398a7/action-slack@v3 | |
if: failure() && (github.event.ref == 'refs/heads/main' || startsWith(github.event.ref, 'refs/heads/sdk-')) | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SLACK_WEBHOOK_URL: ${{ secrets.slack_webhook_android }} | |
MATRIX_CONTEXT: ${{ toJson(matrix) }} | |
with: | |
channel: '#expo-android' | |
status: ${{ job.status }} | |
fields: job,message,ref,eventName,author,took | |
author_name: Test Suite (Android) | |
android-test: | |
needs: android-build | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
api-level: [34] | |
steps: | |
- name: 👀 Checkout | |
uses: actions/checkout@v4 | |
- name: 🌠 Download builds | |
uses: actions/download-artifact@v4 | |
with: | |
name: bare-expo-android-builds | |
path: apps/bare-expo/android/app/build/outputs/apk | |
- name: 🧪 Run tests | |
uses: ./.github/actions/use-android-emulator | |
with: | |
avd-api: ${{ matrix.api-level }} | |
avd-name: avd-${{ matrix.api-level }} | |
script: ./scripts/start-android-e2e-test.sh | |
working-directory: ./apps/bare-expo | |
- name: 📸 Store images of test failures | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: bare-expo-artifacts-android | |
path: apps/bare-expo/artifacts | |
- name: 🔔 Notify on Slack | |
uses: 8398a7/action-slack@v3 | |
if: failure() && (github.event.ref == 'refs/heads/main' || startsWith(github.event.ref, 'refs/heads/sdk-')) | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SLACK_WEBHOOK_URL: ${{ secrets.slack_webhook_android }} | |
MATRIX_CONTEXT: ${{ toJson(matrix) }} | |
with: | |
channel: '#expo-android' | |
status: ${{ job.status }} | |
fields: job,message,ref,eventName,author,took | |
author_name: Test Suite (Android) |