Open History to see the last commit
1name: pr
2β
3on:
4 pull_request:
5 paths-ignore:
6 - 'media/**'
7β
8concurrency:
9 group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
10 cancel-in-progress: true
11β
12env:
13 NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
14β
15jobs:
16 main:
17 name: Nx Cloud - Main Job
18 runs-on: ubuntu-latest
19 steps:
20 - name: Checkout
21 uses: actions/checkout@v4
22 with:
23 fetch-depth: 0
24 - name: Setup pnpm
25 uses: pnpm/action-setup@v2
26 with:
27 version: 8
28 - name: Setup Node
29 uses: actions/setup-node@v4
30 with:
31 node-version-file: .nvmrc
32 cache: pnpm
33 - name: Start Nx Agents
34 run: npx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml"
35 - name: Install dependencies
36 run: pnpm install --frozen-lockfile --prefer-offline
37 - name: Get base and head commits for `nx affected`
38 uses: nrwl/nx-set-shas@v3
39 with:
40 main-branch-name: 'main'
41 - name: Run Tests
42 run: pnpm run test:pr --parallel=3
43 - name: Stop Nx Agents
44 if: ${{ always() }}
45 run: npx nx-cloud stop-all-agents
46 - name: Upload coverage to Codecov
47 uses: codecov/codecov-action@v4
48 with:
49 directory: packages