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β
13permissions:
14 contents: read
15 pull-requests: write
16 issues: write
17β
18jobs:
19 test:
20 name: Test
21 runs-on: ubuntu-latest
22 steps:
23 - name: Checkout
24 uses: actions/checkout@v6.0.2
25 with:
26 fetch-depth: 0
27 - name: Start Nx Agents
28 run: npx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml"
29 - name: Setup Tools
30 uses: TanStack/config/.github/setup@main
31 - name: Get base and head commits for `nx affected`
32 uses: nrwl/nx-set-shas@v4.4.0
33 with:
34 main-branch-name: main
35 - name: Run Checks
36 run: pnpm run test:pr
37 - name: Stop Nx Agents
38 if: ${{ always() }}
39 run: npx nx-cloud stop-all-agents
40 preview:
41 name: Preview
42 runs-on: ubuntu-latest
43 steps:
44 - name: Checkout
45 uses: actions/checkout@v6.0.2
46 - name: Setup Tools
47 uses: TanStack/config/.github/setup@main
48 - name: Build Packages
49 run: pnpm run build:all
50 - name: Publish Previews
51 run: pnpx pkg-pr-new publish --pnpm --compact './packages/*' --template './examples/*/*'
52 - name: Determine commit SHA
53 id: determine-sha
54 run: |
55 echo "COMMIT_SHA=${{ github.event.pull_request.head.sha || github.sha }}" >> $GITHUB_ENV
56 - name: Size Limit
57 uses: andresz1/size-limit-action@94bc357df29c36c8f8d50ea497c3e225c3c95d1d
58 with:
59 github_token: ${{ secrets.GITHUB_TOKEN }}
60 skip_step: install
61 build_script: build:all
62 provenance:
63 name: Provenance
64 runs-on: ubuntu-latest
65 steps:
66 - name: Checkout
67 uses: actions/checkout@v6.0.2
68 - name: Check Provenance
69 uses: danielroe/provenance-action@v0.1.1
70 with:
71 fail-on-downgrade: true
72 version-preview:
73 name: Version Preview
74 runs-on: ubuntu-latest
75 steps:
76 - name: Checkout
77 uses: actions/checkout@v6.0.2
78 - name: Setup Tools
79 uses: TanStack/config/.github/setup@main
80 - name: Changeset Preview
81 uses: TanStack/config/.github/changeset-preview@main