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 # Enable dynamic task packing for distributed CI.
14 NX_CLOUD_AGENT_TASK_QUEUE: true
15 NX_CLOUD_AUTO_TASK_PACKING: true
16 NX_CLOUD_AGENT_UNCAPPED_GROUP_WORK: true
17 NX_CLOUD_PACKING_MEM_MULTIPLIER: 1.5
18 NX_CLOUD_BUFFER_TASK_COMPLETIONS: true
19 NX_CLOUD_CONTINUOUS_ASSIGNMENT: true
20β
21permissions:
22 contents: read
23β
24jobs:
25 test:
26 name: Test
27 runs-on: ubuntu-latest
28 env:
29 TSR_TMP_DIR: ./tmp
30 steps:
31 - name: Checkout
32 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
33 with:
34 fetch-depth: 0
35 persist-credentials: false
36 - name: Start Nx Workers
37 run: npx nx-cloud start-workers
38 - name: Setup Vite+
39 uses: voidzero-dev/setup-vp@cab1ab9eaff52d4857875f4f2c016e36af8f2c76 # v1.22.0
40 - name: Get base and head commits for `nx affected`
41 uses: nrwl/nx-set-shas@afb73a62d26e41464e9254689e1fd6122ee683c1 # v5.0.1
42 with:
43 main-branch-name: main
44 - name: Run Checks
45 run: vp run test:pr --parallel=3
46 - name: Stop Nx Workers
47 if: ${{ always() }}
48 run: npx nx-cloud stop-all-workers
49 preview:
50 name: Preview
51 runs-on: ubuntu-latest
52 permissions:
53 contents: read
54 pull-requests: write
55 steps:
56 - name: Checkout
57 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
58 with:
59 fetch-depth: 0
60 persist-credentials: false
61 - name: Setup Vite+
62 uses: voidzero-dev/setup-vp@cab1ab9eaff52d4857875f4f2c016e36af8f2c76 # v1.22.0
63 - name: Build Packages
64 run: vp run build:all
65 - name: Publish Previews
66 run: vpx pkg-pr-new publish --pnpm './packages/*' --template './examples/*/*'
67 version-preview:
68 name: Version Preview
69 runs-on: ubuntu-latest
70 permissions:
71 contents: read
72 pull-requests: write
73 steps:
74 - name: Checkout
75 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
76 with:
77 persist-credentials: false
78 - name: Setup Vite+
79 uses: voidzero-dev/setup-vp@cab1ab9eaff52d4857875f4f2c016e36af8f2c76 # v1.22.0
80 - name: Changeset Preview
81 uses: TanStack/config/.github/changeset-preview@e4b48f16568324f76f467aa4c2aac2f05db632c3 # main