1name: Development Client latest e2e
2
3on:
4  workflow_dispatch: {}
5  schedule:
6    - cron: '0 0 * * SUN' # 0:00 AM UTC time every Sunday
7
8concurrency:
9  group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
10  cancel-in-progress: true
11
12jobs:
13  detox_latest_e2e:
14    runs-on: macos-13
15    strategy:
16      matrix:
17        api-level: [33]
18    steps:
19      - name: �� Checkout
20        uses: actions/checkout@v3
21      - name: ➕ Add `bin` to GITHUB_PATH
22        run: echo "$(pwd)/bin" >> $GITHUB_PATH
23      - name: �� Install required tools
24        run: |
25          brew tap wix/brew
26          brew install applesimutils
27          brew install watchman
28      - name: �� Setup Ruby and install gems
29        uses: ruby/setup-ruby@v1
30        with:
31          bundler-cache: true
32          ruby-version: 3.2.2
33      - name: �� Install cocoapods
34        run: sudo gem install cocoapods
35      - name: �� Use JDK 11
36        uses: actions/setup-java@v3
37        with:
38          distribution: 'temurin'
39          java-version: '11'
40      - name: ♻️ Restore caches
41        uses: ./.github/actions/expo-caches
42        id: expo-caches
43        with:
44          gradle: 'true'
45          yarn-workspace: 'true'
46      - name: �� Set up android emulator
47        uses: ./.github/actions/use-android-emulator
48        with:
49          avd-api: ${{ matrix.api-level }}
50          avd-name: avd-${{ matrix.api-level }}
51      - name: �� Install `expo-test-runner`
52        run: |
53          yarn global add expo-test-runner@$(cat package.json | grep '"expo-test-runner": "[0-9]*\.[0-9]*\.[0-9]*' | head -n 1 | awk '{print $2}' | sed 's/"//g; s/,//g')
54        working-directory: packages/expo-dev-client
55      - name: �� Run tests
56        run: |
57          yarn latest-e2e
58        working-directory: packages/expo-dev-client
59      - name: �� Store artifacts of build failures
60        if: failure()
61        uses: actions/upload-artifact@v3
62        with:
63          name: expo-dev-client-latest-e2e-artifacts
64          path: packages/expo-dev-client/artifacts
65      - name: �� Notify on Slack
66        uses: 8398a7/action-slack@v3
67        if: failure()
68        env:
69          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
70          SLACK_WEBHOOK_URL: ${{ secrets.slack_webhook_dev_client }}
71          MATRIX_CONTEXT: ${{ toJson(matrix) }}
72        with:
73          channel: '#dev-clients'
74          status: ${{ job.status }}
75          fields: job,message,ref,eventName,author,took
76          author_name: Dev Client e2e
77