Skip to content

Commit 18d581e

Browse files
authoredJun 30, 2024··
ci: Optimise Nx workflow (#5636)
* ci: Optimise Nx workflow * Update dynamic-changesets
1 parent e585a2e commit 18d581e

File tree

3 files changed

+9
-25
lines changed

3 files changed

+9
-25
lines changed
 

‎.github/workflows/ci.yml

+3-12
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,11 @@ jobs:
2525
- name: Checkout
2626
uses: actions/checkout@v4
2727
with:
28-
fetch-depth: '0'
29-
- name: Setup pnpm
30-
uses: pnpm/action-setup@v4
31-
- name: Setup Node
32-
uses: actions/setup-node@v4
33-
with:
34-
node-version-file: .nvmrc
35-
cache: pnpm
28+
fetch-depth: 0
3629
- name: Start Nx Agents
3730
run: npx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml"
38-
- name: Install dependencies
39-
run: pnpm install --frozen-lockfile --prefer-offline
31+
- name: Setup Tools
32+
uses: tanstack/config/.github/setup@main
4033
- name: Run Tests
4134
run: pnpm run test:ci --parallel=3
4235
- name: Stop Nx Agents
@@ -49,8 +42,6 @@ jobs:
4942
npm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}"
5043
pnpm run cipublish
5144
env:
52-
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
5345
GH_TOKEN: ${{ secrets.GH_TOKEN }}
5446
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
55-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
5647
TAG: ${{ inputs.tag }}

‎.github/workflows/pr.yml

+3-10
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,12 @@ jobs:
2323
uses: actions/checkout@v4
2424
with:
2525
fetch-depth: 0
26-
- name: Setup pnpm
27-
uses: pnpm/action-setup@v4
28-
- name: Setup Node
29-
uses: actions/setup-node@v4
30-
with:
31-
node-version-file: .nvmrc
32-
cache: pnpm
3326
- name: Start Nx Agents
3427
run: npx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml"
35-
- name: Install dependencies
36-
run: pnpm install --frozen-lockfile --prefer-offline
28+
- name: Setup Tools
29+
uses: tanstack/config/.github/setup@main
3730
- name: Get base and head commits for `nx affected`
38-
uses: nrwl/nx-set-shas@v3
31+
uses: nrwl/nx-set-shas@v4
3932
with:
4033
main-branch-name: 'main'
4134
- name: Run Checks

‎.nx/workflows/dynamic-changesets.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
distribute-on:
2-
small-changeset: 8 linux-medium-js
3-
medium-changeset: 10 linux-medium-js
4-
large-changeset: 12 linux-medium-js
2+
small-changeset: 3 linux-medium-js
3+
medium-changeset: 6 linux-medium-js
4+
large-changeset: 10 linux-medium-js

0 commit comments

Comments
 (0)
Please sign in to comment.