File tree 2 files changed +34
-7
lines changed
2 files changed +34
-7
lines changed Original file line number Diff line number Diff line change 2
2
#
3
3
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
4
4
#
5
- version : 2
5
+ version : 2.1
6
+
7
+ workflows :
8
+ all-tests :
9
+ jobs :
10
+ - test-and-build :
11
+ # Override graphql-version to test against specific versions. Type checking is disabled due missing
12
+ # definitions for field extensions in older @types/graphql versions
13
+ matrix :
14
+ parameters :
15
+ graphql-version : ["~0.13", "~14.0", "~14.5", "~14.6"]
16
+ - test-and-build :
17
+ # Leave graphql-version unspecified to respect the lockfile and also run tsc
18
+ name : test-and-build-with-typecheck
19
+
6
20
jobs :
7
- build :
21
+ test-and-build :
22
+ parameters :
23
+ graphql-version :
24
+ type : string
25
+ default : " "
26
+
8
27
docker :
9
28
# specify the version you desire here
10
29
- image : circleci/node:latest
@@ -17,16 +36,24 @@ jobs:
17
36
# Download and cache dependencies
18
37
- restore_cache :
19
38
keys :
20
- - v1-dependencies-{{ checksum "package.json" }}
39
+ - v1-dependencies-{{ checksum "package.json" }}-<< parameters.graphql-version >>
21
40
# fallback to using the latest cache if no exact match is found
22
41
- v1-dependencies-
23
42
24
- - run : yarn
43
+ - when :
44
+ condition : << parameters.graphql-version >>
45
+ steps :
46
+ - run : yarn install --ignore-scripts
47
+ - run : yarn --ignore-scripts add --dev graphql@<< parameters.graphql-version >>
48
+ - unless :
49
+ condition : << parameters.graphql-version >>
50
+ steps :
51
+ - run : yarn install --frozen-lockfile
25
52
26
53
- save_cache :
27
54
paths :
28
55
- node_modules
29
- key : v1-dependencies-{{ checksum "package.json" }}
56
+ key : v1-dependencies-{{ checksum "package.json" }}-<< parameters.graphql-version >>
30
57
31
58
# run tests!
32
- - run : yarn test
59
+ - run : yarn test
Original file line number Diff line number Diff line change 9
9
"clean" : " rimraf dist/*" ,
10
10
"build" : " tsc" ,
11
11
"test" : " npm run lint && npm run testonly" ,
12
- "testonly" : " mocha --check-leaks --exit --full-trace --require ts-node/register 'src/**/__tests__/**/*-test.{ts,tsx}'" ,
12
+ "testonly" : " mocha --check-leaks --exit --full-trace --require ts-node/register/transpile-only 'src/**/__tests__/**/*-test.{ts,tsx}'" ,
13
13
"dist" : " npm run clean && tsc && npm run build" ,
14
14
"prepublish" : " npm run clean && npm run dist"
15
15
},
You can’t perform that action at this time.
0 commit comments