File tree 1 file changed +31
-3
lines changed
1 file changed +31
-3
lines changed Original file line number Diff line number Diff line change 1
1
version : 2.1
2
-
2
+
3
3
defaults : &defaults
4
4
working_directory : ~/repo
5
5
docker :
@@ -31,6 +31,19 @@ yarn_install: &yarn_install
31
31
name : Install Dependencies
32
32
command : yarn install --frozen-lockfile --non-interactive
33
33
34
+ codecov_install : &codecov_install
35
+ name : Install codecov
36
+ command : |
37
+ if [ ! -f ./codecov ]; then
38
+ curl -Os https://uploader.codecov.io/v0.1.0_4653/linux/codecov
39
+ curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import # One-time step
40
+ curl -Os https://uploader.codecov.io/latest/linux/codecov
41
+ curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
42
+ curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig
43
+ gpgv codecov.SHA256SUM.sig codecov.SHA256SUM
44
+ shasum -a 256 -c codecov.SHA256SUM
45
+ chmod +x codecov
46
+ fi
34
47
jobs :
35
48
install :
36
49
<< : *defaults
45
58
paths :
46
59
- ~/.cache
47
60
- node_modules
61
+ - restore_cache :
62
+ keys :
63
+ - codecov-0.1.0_4653
64
+ - run :
65
+ << : *codecov_install
66
+ - save_cache :
67
+ key : codecov-0.1.0_4653
68
+ paths :
69
+ - ./codecov
70
+
48
71
lint :
49
72
<< : *defaults
50
73
steps :
64
87
<< : *set_env
65
88
- restore_cache :
66
89
<< : *yarn_cache
67
- - run : yarn nx affected --target=test --head=HEAD --ci --code-coverage --maxWorkers=2 ${AFFECTED_ARGS}
90
+ - restore_cache :
91
+ keys :
92
+ - codecov-0.1.0_4653
93
+ - run : yarn nx affected --target=test --head=HEAD --ci --coverage --maxWorkers=2 --coverageReporters=lcov ${AFFECTED_ARGS}
68
94
# --maxWorkers=2 is required because we'll run virtual machine with 32 cores CPU (with actually 4 CPI), jest spawns lots of workers if we don't fix the worker size.
69
95
# https://support.circleci.com/hc/en-us/articles/360005442714-Your-test-tools-are-smart-and-that-s-a-problem-Learn-about-when-optimization-goes-wrong-
96
+ - run : ./codecov -t ${CODECOV_TOKEN}
97
+
70
98
workflows :
71
99
version : 2
72
100
pr-check :
@@ -77,4 +105,4 @@ workflows:
77
105
- install
78
106
- test :
79
107
requires :
80
- - install
108
+ - install
You can’t perform that action at this time.
0 commit comments