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β
15jobs:
16 test:
17 name: Test
18 runs-on: ubuntu-latest
19 permissions:
20 contents: read
21 pull-requests: write
22 steps:
23 - name: Checkout
24 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
25 with:
26 fetch-depth: 0
27 persist-credentials: false
28 - name: Start Nx Agents
29 run: npx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml"
30 - name: Setup Vite+
31 uses: voidzero-dev/setup-vp@cab1ab9eaff52d4857875f4f2c016e36af8f2c76 # v1.22.0
32 - name: Get base and head commits for `nx affected`
33 uses: nrwl/nx-set-shas@3e9ad7370203c1e93d109be57f3b72eb0eb511b1 # v4.4.0
34 with:
35 main-branch-name: main
36 - name: Run Checks
37 run: vp run test:pr
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 permissions:
45 contents: read
46 pull-requests: write
47 steps:
48 - name: Checkout
49 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
50 with:
51 persist-credentials: false
52 - name: Setup Vite+
53 uses: voidzero-dev/setup-vp@cab1ab9eaff52d4857875f4f2c016e36af8f2c76 # v1.22.0
54 - name: Build Packages
55 run: vp run build:all
56 - name: Publish Previews
57 run: vpx pkg-pr-new publish --pnpm --compact './packages/*' --template './examples/*/*'
58 - name: Determine commit SHA
59 id: determine-sha
60 run: echo "COMMIT_SHA=${COMMIT_SHA}" >> "$GITHUB_ENV"
61 env:
62 COMMIT_SHA: ${{ github.event.pull_request.head.sha || github.sha }}
63 - name: Size Limit
64 run: vp run test:size
65 version-preview:
66 name: Version Preview
67 runs-on: ubuntu-latest
68 permissions:
69 contents: read
70 pull-requests: write
71 issues: write
72 steps:
73 - name: Checkout
74 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
75 with:
76 persist-credentials: false
77 - name: Setup Vite+
78 uses: voidzero-dev/setup-vp@cab1ab9eaff52d4857875f4f2c016e36af8f2c76 # v1.22.0
79 - name: Changeset Preview
80 uses: TanStack/config/.github/changeset-preview@466151b2d479656b38942cd84a0a3dce29d48de3