1name: CLI 2 3on: 4 push: 5 branches: [main, 'sdk-*'] 6 paths: 7 - .github/workflows/cli.yml 8 - packages/expo/** 9 - yarn.lock 10 pull_request: 11 paths: 12 - .github/workflows/cli.yml 13 - packages/expo/** 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-18.04 25 steps: 26 - name: Checkout a ref for the event 27 uses: actions/checkout@v2 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/@unimodules/*/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: Build CLI 50 run: yarn prepare:cli 51 working-directory: packages/expo 52 - name: Unit Test CLI 53 run: yarn test:cli 54 working-directory: packages/expo 55 - name: E2E Test CLI 56 run: yarn test:cli:e2e 57 working-directory: packages/expo 58 # - name: Notify on Slack 59 # uses: 8398a7/action-slack@v3 60 # if: failure() && (github.event.ref == 'refs/heads/main' || startsWith(github.event.ref, 'refs/heads/sdk-')) 61 # env: 62 # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 63 # SLACK_WEBHOOK_URL: ${{ secrets.slack_webhook_api }} 64 # with: 65 # channel: '#expo-cli' 66 # status: ${{ job.status }} 67 # fields: job,message,ref,eventName,author,took 68 # author_name: Check packages 69