Skip to content

Commit c4ea388

Browse files
authoredFeb 17, 2024
ci: Add Nx agents (#43)
1 parent 848300a commit c4ea388

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed
 

‎.github/workflows/pr.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,16 @@ jobs:
3232
with:
3333
node-version-file: .nvmrc
3434
cache: pnpm
35+
- name: Start Nx Agents
36+
run: npx nx-cloud start-ci-run --distribute-on=".nx/workflows/dynamic-changesets.yaml"
3537
- name: Install dependencies
3638
run: pnpm install --frozen-lockfile --prefer-offline
3739
- name: Get base and head commits for `nx affected`
3840
uses: nrwl/nx-set-shas@v3
3941
with:
4042
main-branch-name: 'main'
4143
- name: Run Checks
42-
run: pnpm run test:pr
44+
run: pnpm run test:pr --parallel=3
45+
- name: Stop Nx Agents
46+
if: ${{ always() }}
47+
run: npx nx-cloud stop-all-agents

‎.gitignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,12 @@ stats.html
3939

4040
*.log
4141
.DS_Store
42-
node_modules
4342
.cache
43+
.pnpm-store
4444
dist
4545
.idea
4646

4747
nx-cloud.env
48-
.nx
4948

5049
.nx/cache
5150
.tsup

‎.nx/workflows/dynamic-changesets.yaml

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

‎nx.json

+4
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,10 @@
5252
"dependsOn": ["build"],
5353
"inputs": ["^public"],
5454
"cache": true
55+
},
56+
"test:format": {
57+
"cache": true,
58+
"inputs": ["{workspaceRoot}/**/*"]
5559
}
5660
}
5761
}

0 commit comments

Comments
 (0)
Please sign in to comment.