Open History to see the last commit
1name: PR
2β
3on:
4 pull_request:
5β
6concurrency:
7 group: ${{ github.workflow }}-${{ github.event.number || github.ref }}
8 cancel-in-progress: true
9β
10env:
11 NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
12 SERVER_PRESET: 'node-server'
13β
14permissions:
15 contents: read
16 pull-requests: write
17β
18jobs:
19 test:
20 name: Test
21 runs-on: ubuntu-latest
22 env:
23 TSR_TMP_DIR: ./tmp
24 steps:
25 - name: Checkout
26 uses: actions/checkout@v6.0.1
27 with:
28 fetch-depth: 0
29 - name: Start Nx Agents
30 run: npx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml"
31 - name: Setup Tools
32 uses: tanstack/config/.github/setup@main
33 - name: Get base and head commits for `nx affected`
34 uses: nrwl/nx-set-shas@v4.4.0
35 with:
36 main-branch-name: main
37 - name: Run Checks
38 run: pnpm run test:pr --parallel=3
39 - name: Stop Nx Agents
40 if: ${{ always() }}
41 run: npx nx-cloud stop-all-agents
42 preview:
43 name: Preview
44 runs-on: ubuntu-latest
45 steps:
46 - name: Checkout
47 uses: actions/checkout@v6.0.1
48 with:
49 fetch-depth: 0
50 - name: Setup Tools
51 uses: tanstack/config/.github/setup@main
52 - name: Build Packages
53 run: pnpm run build:all
54 - name: Publish Previews
55 run: pnpx pkg-pr-new publish --pnpm './packages/*' --template './examples/*/*'