xref: /expo/.github/workflows/cli.yml (revision 322d64bb)
1name: CLI
2
3on:
4  push:
5    branches: [main, 'sdk-*']
6    paths:
7      - .github/workflows/cli.yml
8      - packages/@expo/cli/**
9      - packages/@expo/metro-runtime/**
10      - packages/@expo/metro-config/**
11      - packages/@expo/fingerprint/**
12      - packages/expo-router/**
13      - yarn.lock
14  pull_request:
15    paths:
16      - .github/workflows/cli.yml
17      - packages/@expo/cli/**
18      - packages/@expo/metro-runtime/**
19      - packages/@expo/metro-config/**
20      - packages/@expo/fingerprint/**
21      - packages/expo-router/**
22      - yarn.lock
23  schedule:
24    - cron: 0 14 * * *
25
26concurrency:
27  group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
28  cancel-in-progress: true
29
30jobs:
31  test:
32    runs-on: ubuntu-22.04
33    steps:
34      - name: �� Checkout
35        uses: actions/checkout@v3
36        with:
37          fetch-depth: 100
38      - name: ⬇️ Fetch commits from base branch
39        run: git fetch origin ${{ github.event.before || github.base_ref || 'main' }}:${{ github.event.before || github.base_ref || 'main' }} --depth 100
40        if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
41      - name: ♻️ Restore caches
42        uses: ./.github/actions/expo-caches
43        id: expo-caches
44        with:
45          yarn-workspace: 'true'
46      - name: �� Install node modules in root dir
47        if: steps.expo-caches.outputs.yarn-workspace-hit != 'true'
48        run: yarn install --frozen-lockfile
49      - name: �� Type Check CLI
50        run: yarn typecheck
51        working-directory: packages/@expo/cli
52      - name: �� Build CLI
53        run: yarn prepare
54        working-directory: packages/@expo/cli
55      - name: E2E Test CLI
56        run: yarn test:e2e
57        working-directory: packages/@expo/cli
58      - name: E2E Test @expo/fingerprint
59        run: yarn test:e2e
60        working-directory: packages/@expo/fingerprint
61      # - name: �� Notify on Slack
62      #   uses: 8398a7/action-slack@v3
63      #   if: failure() && (github.event.ref == 'refs/heads/main' || startsWith(github.event.ref, 'refs/heads/sdk-'))
64      #   env:
65      #     GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66      #     SLACK_WEBHOOK_URL: ${{ secrets.slack_webhook_api }}
67      #   with:
68      #     channel: '#expo-cli'
69      #     status: ${{ job.status }}
70      #     fields: job,message,ref,eventName,author,took
71      #     author_name: Check packages
72