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-12
15    strategy:
16      matrix:
17        api-level: [31]
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      - name: �� Install cocoapods
33        run: sudo gem install cocoapods
34      - name: �� Use JDK 11
35        uses: actions/setup-java@v3
36        with:
37          distribution: 'temurin'
38          java-version: '11'
39      - name: ♻️ Restore caches
40        uses: ./.github/actions/expo-caches
41        id: expo-caches
42        with:
43          yarn-workspace: 'true'
44          avd: 'true'
45          avd-api: ${{ matrix.api-level }}
46      - name: �� Install `expo-test-runner`
47        run: |
48          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')
49        working-directory: packages/expo-dev-client
50      - name: �� Run tests
51        run: |
52          yarn latest-e2e
53        working-directory: packages/expo-dev-client
54      - name: �� Store artifacts of build failures
55        if: failure()
56        uses: actions/upload-artifact@v3
57        with:
58          name: expo-dev-client-latest-e2e-artifacts
59          path: packages/expo-dev-client/artifacts
60      - name: �� Notify on Slack
61        uses: 8398a7/action-slack@v3
62        if: failure()
63        env:
64          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65          SLACK_WEBHOOK_URL: ${{ secrets.slack_webhook_dev_client }}
66          MATRIX_CONTEXT: ${{ toJson(matrix) }}
67        with:
68          channel: '#dev-clients'
69          status: ${{ job.status }}
70          fields: job,message,ref,eventName,author,took
71          author_name: Dev Client e2e
72