@@ -47,22 +47,18 @@ jobs:
4747 with :
4848 fetch-depth : 0
4949 token : ${{ secrets.GH_TOKEN }}
50- - uses : pnpm/action-setup@v4
51- with :
52- run_install : false
53- - uses : actions/setup-node@v4
54- id : cache
55- with :
56- node-version-file : ' .node-version'
57- cache : ' pnpm'
58- registry-url : ' https://registry.npmjs.org'
59-
60- - name : Update npm
61- run : npm install -g npm@latest
50+ - name : Install Nix
51+ uses : DeterminateSystems/nix-installer-action@v10
6252
63- - run : pnpm install --frozen-lockfile
53+ - name : Install Dependencies
54+ run : |
55+ nix develop --command -- <<EOF
56+ npm install -g npm@latest
57+ pnpm install --frozen-lockfile
58+ EOF
6459
65- - run : pnpm dlx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yml" --stop-agents-after="e2e-ci" --with-env-vars="CODECOV_TOKEN"
60+ - name : Start Nx Cloud CI Run
61+ run : nix develop --command pnpm dlx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yml" --stop-agents-after="e2e-ci" --with-env-vars="CODECOV_TOKEN"
6662
6763 - name : Cache Playwright browsers
6864 uses : actions/cache@v4
@@ -72,14 +68,13 @@ jobs:
7268 restore-keys : |
7369 ${{ runner.os }}-playwright-
7470
75- - run : pnpm exec playwright install
76-
77- - uses : nrwl/nx-set-shas@v4
78-
79- - name : setup pnpm config
80- run : pnpm config set store-dir $PNPM_CACHE_FOLDER
81-
82- - run : pnpm exec nx affected -t build lint test e2e-ci
71+ - name : Install Browsers, Configure Pnpm, and Run Nx Affected
72+ run : |
73+ nix develop --command -- <<EOF
74+ pnpm exec playwright install
75+ pnpm config set store-dir $PNPM_CACHE_FOLDER
76+ pnpm exec nx affected -t build lint test e2e-ci
77+ EOF
8378
8479 - uses : actions/upload-artifact@v4
8580 if : ${{ !cancelled() }}
9489 uses : changesets/action@v1
9590 id : changesets
9691 with :
97- publish : pnpm ci:release
98- version : pnpm ci:version
92+ publish : nix develop --command pnpm ci:release
93+ version : nix develop --command pnpm ci:version
9994 title : Release PR
10095 branch : main
10196 commit : ' chore: version-packages'
@@ -122,12 +117,10 @@ jobs:
122117 token : ${{ secrets.CODECOV_TOKEN }}
123118
124119 - name : Ensure builds run
125- run : pnpm nx run-many -t build
126- env :
127- NX_CLOUD_DISTRIBUTED_EXECUTION : false
120+ run : nix develop --command pnpm nx run-many -t build
128121
129122 - name : Build docs
130- run : pnpm generate-docs
123+ run : nix develop --command pnpm generate-docs
131124
132125 - name : Publish api docs
133126 if : steps.changesets.outputs.published == 'true'
@@ -147,12 +140,14 @@ jobs:
147140
148141 - name : Calculate baseline bundle sizes
149142 run : |
150- chmod +x ./scripts/bundle-sizes.sh
151- rm -f previous_sizes.json
152- echo "📊 Calculating fresh baseline bundle sizes for main branch"
153- ./scripts/bundle-sizes.sh
154- echo "✅ Baseline bundle sizes calculated"
155- cat previous_sizes.json
143+ nix develop --command -- <<EOF
144+ chmod +x ./scripts/bundle-sizes.sh
145+ rm -f previous_sizes.json
146+ echo "📊 Calculating fresh baseline bundle sizes for main branch"
147+ ./scripts/bundle-sizes.sh
148+ echo "✅ Baseline bundle sizes calculated"
149+ cat previous_sizes.json
150+ EOF
156151
157152 - name : Upload baseline bundle sizes
158153 uses : actions/upload-artifact@v4
@@ -177,20 +172,23 @@ jobs:
177172 with :
178173 fetch-depth : 0
179174 ref : ${{ inputs.branch }}
180- - uses : pnpm/action-setup@v4
181- with :
182- run_install : false
183- - uses : actions/setup-node@v4
184- with :
185- node-version-file : ' .node-version'
186- cache : ' pnpm'
187175
188- - name : Update npm
189- run : npm install -g npm@latest
176+ - name : Install Nix
177+ uses : DeterminateSystems/nix-installer-action@v10
190178
191- - run : pnpm install --frozen-lockfile
179+ - name : Configure Nix Cache
180+ uses : cachix/cachix-action@v14
181+ with :
182+ name : ping-javascript-sdk # Matches the cache name in ci.yml
183+ authToken : ' ${{ secrets.CACHIX_AUTH_TOKEN }}'
192184
193- - run : pnpm dlx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yml" --stop-agents-after="e2e-ci" --with-env-vars="CODECOV_TOKEN"
185+ - name : Install Dependencies and Start CI Run
186+ run : |
187+ nix develop --command -- <<EOF
188+ npm install -g npm@latest
189+ pnpm install --frozen-lockfile
190+ pnpm dlx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yml" --stop-agents-after="e2e-ci" --with-env-vars="CODECOV_TOKEN"
191+ EOF
194192
195193 - name : Cache Playwright browsers
196194 uses : actions/cache@v4
@@ -200,16 +198,13 @@ jobs:
200198 restore-keys : |
201199 ${{ runner.os }}-playwright-
202200
203- - run : pnpm exec playwright install
204-
205- - uses : nrwl/nx-set-shas@v4
206- with :
207- main-branch-name : main
208-
209- - name : setup pnpm config
210- run : pnpm config set store-dir $PNPM_CACHE_FOLDER
211-
212- - run : pnpm exec nx run-many -t build test e2e-ci
201+ - name : Install Browsers, Configure Pnpm, and Run Nx
202+ run : |
203+ nix develop --command -- <<EOF
204+ pnpm exec playwright install
205+ pnpm config set store-dir $PNPM_CACHE_FOLDER
206+ pnpm exec nx run-many -t build test e2e-ci
207+ EOF
213208
214209 - uses : actions/upload-artifact@v4
215210 if : ${{ !cancelled() }}
@@ -219,11 +214,11 @@ jobs:
219214 ./**/.playwright/**
220215 retention-days : 30
221216
222- - name : Version Packages as prerelease
223- run : pnpm changeset version --snapshot ${{ inputs.prerelease }}
217+ - name : Version and Publish Packages
218+ run : |
219+ nix develop --command -- <<EOF
220+ pnpm changeset version --snapshot ${{ inputs.prerelease }}
221+ pnpm publish -r --tag ${{ inputs.dist_tag }} --no-git-checks --access ${{ inputs.access }}
222+ EOF
224223 env :
225224 GITHUB_TOKEN : ${{ secrets.GH_TOKEN }}
226-
227- # The actual npm publish that must occur in the authorized file
228- - name : Publish packages with dist-tag
229- run : pnpm publish -r --tag ${{ inputs.dist_tag }} --no-git-checks --access ${{ inputs.access }}
0 commit comments