15
15
16
16
jobs :
17
17
main :
18
- name : Nx Cloud - Main Job
18
+ name : Nx Cloud
19
19
runs-on : ubuntu-latest
20
20
steps :
21
21
- name : Checkout
@@ -31,46 +31,15 @@ jobs:
31
31
cache : pnpm
32
32
cache-dependency-path : pnpm-lock.yaml
33
33
- name : Install dependencies
34
- run : pnpm --filter "./packages/**" --filter query --prefer-offline install
35
- - name : Get appropriate base and head commits for `nx affected` commands
36
- uses : nrwl/nx-set-shas@v3
34
+ run : pnpm install --frozen-lockfile
35
+ - name : Get base and head commits for `nx affected`
36
+ uses : nrwl/nx-set-shas@v4.3.0
37
37
with :
38
- main-branch-name : ' main'
39
- - run : |
40
- echo "BASE: ${{ env.NX_BASE }}"
41
- echo "HEAD: ${{ env.NX_HEAD }}"
42
- - name : Start CI Orchestrator
43
- run : npx nx-cloud start-ci-run
38
+ main-branch-name : main
44
39
- name : Run Tests
45
40
run : pnpm run test:pr
46
- - name : Stop Agents
47
- run : npx nx-cloud stop-all-agents
48
41
- name : Upload coverage to Codecov
49
42
uses : codecov/codecov-action@v3
50
- agents :
51
- name : Nx Cloud - Agents
52
- runs-on : ubuntu-latest
53
- timeout-minutes : 10
54
- strategy :
55
- matrix :
56
- agent : [1, 2, 3]
57
- steps :
58
- - name : Checkout
59
-
60
- with :
61
- fetch-depth : 0
62
- - name : Setup pnpm
63
-
64
- - name : Setup Node
65
- uses : actions/setup-node@v3
66
- with :
67
- node-version-file : .nvmrc
68
- cache : pnpm
69
- cache-dependency-path : pnpm-lock.yaml
70
- - name : Install dependencies
71
- run : pnpm --filter "./packages/**" --filter query --prefer-offline install
72
- - name : Start Nx Agent ${{ matrix.agent }}
73
- run : npx nx-cloud start-agent
74
43
format :
75
44
name : Format
76
45
runs-on : ubuntu-latest
88
57
cache : pnpm
89
58
cache-dependency-path : pnpm-lock.yaml
90
59
- name : Install dependencies
91
- run : pnpm --filter "./packages/**" --filter query --prefer-offline install
60
+ run : pnpm install --frozen-lockfile
92
61
- name : Run prettier
93
62
run : pnpm run test:format
94
63
test-react-17 :
@@ -109,15 +78,17 @@ jobs:
109
78
cache : pnpm
110
79
cache-dependency-path : pnpm-lock.yaml
111
80
- name : Install dependencies
112
- run : pnpm --filter "./packages/**" --filter query --prefer-offline install
113
- - name : Derive appropriate SHAs for base and head for `nx affected` commands
114
- uses : nrwl/nx-set-shas@v2
81
+ run : pnpm install --frozen-lockfile
82
+ - name : Get base and head commits for `nx affected`
83
+
84
+ with :
85
+ main-branch-name : main
115
86
- name : Run Tests
116
87
uses :
nick-fields/[email protected]
117
88
with :
118
89
timeout_minutes : 5
119
90
max_attempts : 3
120
- command : npx nx affected --targets=test:lib --base=${{ github.event.pull_request.base.sha }}
91
+ command : pnpm nx affected --targets=test:lib
121
92
env :
122
93
NX_CLOUD_DISTRIBUTED_EXECUTION : false
123
94
REACTJS_VERSION : 17
0 commit comments