Skip to content

Updates e2e (disabled) EAS #4

Updates e2e (disabled) EAS

Updates e2e (disabled) EAS #4

name: Updates e2e (disabled) EAS
on:
workflow_dispatch: {}
pull_request:
paths:
- .github/workflows/updates-e2e-disabled.yml
- packages/expo-asset/**
- packages/expo-manifests/**
- packages/expo-updates-interface/**
- packages/expo-updates/**
push:
branches: [main, 'sdk-*']
paths:
- .github/workflows/updates-e2e-disabled.yml
- packages/expo-asset/**
- packages/expo-manifests/**
- packages/expo-updates-interface/**
- packages/expo-updates/**
schedule:
- cron: '0 18 * * SUN' # 18:00 UTC every Sunday
concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: false
matrix:
platform: [ios, android]
variant: ${{ (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') && fromJson('["updates_testing_debug", "updates_testing_release"]') || fromJson('["updates_testing_debug"]') }}
runs-on: ubuntu-22.04
timeout-minutes: 80
env:
UPDATES_PORT: 4747
steps:
- name: 👀 Checkout
uses: actions/checkout@v4
- name: ⬢ Setup Node
uses: actions/setup-node@v4
with:
node-version: 18
- name: ➕ Add `bin` to GITHUB_PATH
run: echo "$(yarn global bin)" >> $GITHUB_PATH
- name: ♻️ Restore caches
uses: ./.github/actions/expo-caches
id: expo-caches
with:
yarn-workspace: 'true'
- name: 🧶 Yarn install
if: steps.expo-caches.outputs.yarn-workspace-hit != 'true'
run: yarn install --frozen-lockfile
- name: 🔧 Install eas-cli
run: yarn global add eas-cli
- name: 🌳 Add EXPO_REPO_ROOT to environment
run: echo "EXPO_REPO_ROOT=$GITHUB_WORKSPACE" >> $GITHUB_ENV
- name: 🌐 Set updates host
run: echo "UPDATES_HOST=localhost" >> $GITHUB_ENV
- name: 🌐 Set updates port
run: echo "UPDATES_PORT=4747" >> $GITHUB_ENV
- name: 📦 Set platform for updates E2E build
run: echo "EAS_PLATFORM=${{ matrix.platform }}" >> $GITHUB_ENV
- name: 📦 Get artifacts path
run: mkdir -p artifact && echo "ARTIFACTS_DEST=$(pwd)/artifact" >> $GITHUB_ENV
- name: 📦 Get commit message
run: echo "COMMIT_MESSAGE=$(git log -1 --pretty=oneline | head -c1000)" >> $GITHUB_ENV
- name: 📦 Set test project location
run: echo "TEST_PROJECT_ROOT=$GITHUB_WORKSPACE/updates-e2e" >> $GITHUB_ENV
- name: 📦 Setup test project for updates E2E disabled tests
run: yarn --silent ts-node --transpile-only ./packages/expo-updates/e2e/setup/create-disabled-eas-project.ts
- name: 🚀 Build with EAS for ${{ matrix.platform }}
uses: ./.github/actions/eas-build
id: build_eas
with:
platform: ${{ env.EAS_PLATFORM }}
profile: ${{ matrix.variant }}
projectRoot: './updates-e2e'
expoToken: ${{ secrets.EAS_BUILD_BOT_TOKEN }}
noWait: ${{ github.event.schedule }}
message: ${{ github.event.pull_request.title }}
- name: On ${{ matrix.platform }} workflow canceled
if: ${{ cancelled() && steps.build_eas.outputs.build_id }}
run: eas build:cancel ${{ steps.build_eas.outputs.build_id }}
working-directory: './updates-e2e'
env:
EXPO_TOKEN: ${{ secrets.EAS_BUILD_BOT_TOKEN }}
EAS_BUILD_PROFILE: ${{ matrix.variant }}
- name: 🔔 Notify on Slack
uses: 8398a7/action-slack@v3
if: failure() && (github.event_name == 'schedule' || 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_api }}
MATRIX_CONTEXT: ${{ toJson(matrix) }}
with:
channel: '#expo-sdk'
status: ${{ job.status }}
fields: job,message,ref,eventName,author,took
author_name: Updates E2E