1name: Expo Updates CLI
2
3on:
4  push:
5    branches: [main]
6    paths:
7      - .github/workflows/expo-updates-cli.yml
8      - packages/expo-updates/cli/**
9      - yarn.lock
10  pull_request:
11    paths:
12      - .github/workflows/expo-updates-cli.yml
13      - packages/expo-updates/cli/**
14      - yarn.lock
15
16concurrency:
17  group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
18  cancel-in-progress: true
19
20jobs:
21  test:
22    runs-on: ubuntu-18.04
23    steps:
24      - name: �� Checkout a ref for the event
25        uses: actions/checkout@v2
26        with:
27          fetch-depth: 100
28      - name: ♻️ Restore workspace node modules
29        uses: actions/cache@v2
30        id: node-modules-cache
31        with:
32          path: |
33            # See "workspaces" → "packages" in the root package.json for the source of truth of
34            # which node_modules are affected by the root yarn.lock
35            node_modules
36            apps/*/node_modules
37            home/node_modules
38            packages/*/node_modules
39            packages/@unimodules/*/node_modules
40            react-native-lab/react-native/node_modules
41          key: ${{ runner.os }}-modules-v2-${{ hashFiles('yarn.lock') }}
42      - name: �� Install node modules in root dir
43        run: yarn install --frozen-lockfile
44      - name: Build CLI
45        run: yarn build:cli
46        working-directory: packages/expo-updates
47      - name: Unit Test CLI
48        run: yarn test:cli
49        working-directory: packages/expo-updates
50