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