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β
17jobs:
18 test:
19 name: Test
20 runs-on: ubuntu-latest
21 env:
22 TSR_TMP_DIR: ./tmp
23 steps:
24 - name: Checkout
25 uses: actions/checkout@v4.2.2
26 with:
27 fetch-depth: 0
28 - name: Start Nx Agents
29 run: npx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml"
30 - name: Setup Tools
31 uses: tanstack/config/.github/setup@main
32 - name: Get base and head commits for `nx affected`
33 uses: nrwl/nx-set-shas@v4.1.2
34 with:
35 main-branch-name: main
36 - name: Run Checks
37 run: pnpm run test:pr --parallel=3
38 - name: Stop Nx Agents
39 if: ${{ always() }}
40 run: npx nx-cloud stop-all-agents
41 preview:
42 name: Preview
43 runs-on: ubuntu-latest
44 steps:
45 - name: Checkout
46 uses: actions/checkout@v4.2.2
47 with:
48 fetch-depth: 0
49 - name: Setup Tools
50 uses: tanstack/config/.github/setup@main
51 - name: Build Packages
52 run: pnpm run build:all
53 - name: Publish Previews
54 run: pnpx pkg-pr-new publish --pnpm './packages/*' --template './examples/*/*'