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 a ref for the event 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 workspace node modules 34 uses: actions/cache@v2 35 id: node-modules-cache 36 with: 37 path: | 38 # See "workspaces" → "packages" in the root package.json for the source of truth of 39 # which node_modules are affected by the root yarn.lock 40 node_modules 41 apps/*/node_modules 42 home/node_modules 43 packages/*/node_modules 44 packages/@expo/*/node_modules 45 react-native-lab/react-native/node_modules 46 key: ${{ runner.os }}-modules-v2-${{ hashFiles('yarn.lock') }} 47 - name: Install node modules in root dir 48 run: yarn install --frozen-lockfile 49 - name: Lint CLI 50 run: yarn lint --max-warnings 0 51 working-directory: packages/@expo/cli 52 - name: Type Check CLI 53 run: yarn typecheck 54 working-directory: packages/@expo/cli 55 - name: Build CLI 56 run: yarn prepare 57 working-directory: packages/@expo/cli 58 - name: Unit Test CLI 59 run: yarn test 60 working-directory: packages/@expo/cli 61 - name: E2E Test CLI 62 run: yarn test:e2e 63 working-directory: packages/@expo/cli 64 # - name: Notify on Slack 65 # uses: 8398a7/action-slack@v3 66 # if: failure() && (github.event.ref == 'refs/heads/main' || startsWith(github.event.ref, 'refs/heads/sdk-')) 67 # env: 68 # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 69 # SLACK_WEBHOOK_URL: ${{ secrets.slack_webhook_api }} 70 # with: 71 # channel: '#expo-cli' 72 # status: ${{ job.status }} 73 # fields: job,message,ref,eventName,author,took 74 # author_name: Check packages 75