-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Expand file tree
/
Copy pathconfig.yml
More file actions
231 lines (221 loc) · 6.33 KB
/
Copy pathconfig.yml
File metadata and controls
231 lines (221 loc) · 6.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
version: 2.1
jobs:
# Filesize:
# docker:
# - image: cimg/node:20.2.0
# steps:
# - checkout
# - run: npm version
# - run: npm ci
# - run: npm run bundlesize
Circularity:
docker:
- image: cimg/node:26.2.0
steps:
- checkout
- run: npm version
- run: npm ci
- run: npm run madge
Publint:
docker:
- image: cimg/node:26.2.0
steps:
- checkout
- run: npm version
- run: npm ci
- run: npm run build
- run: npm run publint
Lint:
docker:
- image: cimg/node:26.2.0
steps:
- checkout
- run: npm version
- run: npm ci
- run: npm run docmodel
- run: npm run build
- run: npm run lint
Formatting:
docker:
- image: cimg/node:26.2.0
steps:
- checkout
- run: npm ci
- run: npm run check:format
Tests:
docker:
- image: cimg/node:26.2.0
parameters:
project:
type: string
steps:
- checkout
- run: npm run ci:precheck
- run: npm version
- run: npm ci
- run: npm run build
- run: npm run typecheck
- run: if test "<< parameters.project >>" = "Core Tests"; then npm run test:memory; fi
- run:
name: Jest suite with coverage
command: npm run test:ci -- --selectProjects "<< parameters.project >>"
environment:
JEST_JUNIT_OUTPUT_FILE: "reports/junit/js-test-results-<< parameters.project >>.xml"
- store_test_results:
path: reports/junit
- store_artifacts:
path: reports/junit
Attest:
docker:
- image: cimg/node:26.2.0
steps:
- checkout
- run: npm ci
- run: npm run test:type-benches
BuildTarball:
docker:
- image: cimg/node:26.2.0
steps:
- checkout
- run: npm run ci:precheck
- run: npm version
- run: npm ci
- run: npm run build && cd dist && mv "$(npm pack --json | jq --raw-output '.[0].filename')" apollo-client.tgz
- persist_to_workspace:
root: dist
paths:
- apollo-client.tgz
IntegrationTests:
parameters:
framework:
type: string
react:
type: string
docker:
- image: cimg/node:26.2.0-browsers
steps:
- checkout
- attach_workspace:
at: /tmp/workspace
- run: pnpm version
- run:
command: pnpm pkg set "pnpm.overrides[@apollo/client]=/tmp/workspace/apollo-client.tgz"
working_directory: integration-tests
- run:
command: |
export VERSION=$(pnpm view react@<< parameters.react >> version)
pnpm pkg set "pnpm.overrides[react]=${VERSION}" "pnpm.overrides[react-dom]=${VERSION}"
working_directory: integration-tests
- run:
command: pnpm run --if-present --filter << parameters.framework >> ci-preparations
working_directory: integration-tests
- run:
command: pnpm install --no-frozen-lockfile
working_directory: integration-tests
- run:
command: cat pnpm-lock.yaml
working_directory: integration-tests
- run:
command: pnpm exec playwright install-deps
working_directory: integration-tests
- run:
command: pnpm exec playwright install
working_directory: integration-tests
- run:
command: pnpm run --if-present --filter << parameters.framework >> build
working_directory: integration-tests
- run:
command: pnpm run --if-present --filter << parameters.framework >> "/test(:.*|$)/"
working_directory: integration-tests
TestPeerDepTypes:
parameters:
externalPackage:
type: string
docker:
- image: cimg/node:26.2.0
steps:
- checkout
- attach_workspace:
at: /tmp/workspace
- run:
working_directory: integration-tests/peerdeps-tsc
command: |
npm install
npm install @apollo/client@/tmp/workspace/apollo-client.tgz
npm install << parameters.externalPackage >>
npm test
workflows:
Build and Test:
jobs:
# - Filesize
- Tests:
matrix:
parameters:
project:
[
"Core Tests",
"Core Tests - RxJS min version",
"ReactDOM 17",
"ReactDOM 18",
"ReactDOM 19",
]
- Circularity
- Publint
- Attest
- Formatting
- Lint
- BuildTarball
- IntegrationTests:
name: Integration Test << matrix.framework >> with React << matrix.react >>
requires:
- BuildTarball
matrix:
parameters:
framework:
- cra5
#- next
- node
- vite
- vite-swc
- wrapping-library
- type-tests
# -browser-esm would need a package publish to npm/CDNs
react:
- "18.3.0"
- latest
- next
exclude:
# CRA only works with React 18
- framework: cra5
react: next
- framework: cra5
react: latest
# next ships it's own React version anyways
- framework: next
react: next
- framework: next
react: "18.3.0"
# node doesn't use React in the tests
- framework: node
react: next
- framework: node
react: "18.3.0"
# we only test AC-internal types
- framework: type-tests
react: next
- framework: type-tests
react: "18.3.0"
- TestPeerDepTypes:
name: Test external types for << matrix.externalPackage >>
requires:
- BuildTarball
matrix:
parameters:
externalPackage:
- "graphql@15"
- "graphql@16"
- "graphql@^17.0.0-alpha"
- "@types/react@17 @types/react-dom@17"
- "@types/react@18 @types/react-dom@18"
- "@types/react@19 @types/react-dom@19"
- "typescript@next"