Skip to content

Commit ef2be3a

Browse files
committed
💚 fix circleci config.yml
💚 test fix to circleci config.yml 💚 test fix to circleci config.yml 💚 test fix to circleci config.yml 💚 test fix to circleci config.yml 💚 test fix to circleci config.yml 💚 test fix to circleci config.yml 💚 test fix to circleci config.yml
1 parent 03dfcaa commit ef2be3a

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

.circleci/config.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,39 @@ version: 2.1
22

33
defaults: &defaults
44
docker:
5-
- image: circleci/node:8.11
5+
- image: circleci/node:14.16.1
66
working_directory: ~/repo
77

88
orbs:
9-
node: circleci/node@3.0.0
109
codecov: codecov/codecov@1.2.3
1110

1211
jobs:
1312
generate-test-coverage-report:
1413
<<: *defaults
1514
steps:
1615
- checkout
17-
- run: npm test -- --coverage
16+
- restore_cache: # restores any cache that is available from a previous build
17+
keys:
18+
- robofriends-cache-v1-{{ checksum "package-lock.json" }}
19+
- robofriends-cache-v1- # if only a few changes, then don't rebuild entire node modules
20+
- run:
21+
name: Installing React Dependencies
22+
command: npm install
23+
- save_cache: # save our cache of the npm dependencies
24+
key: robofriends-cache-v1-{{ checksum "package-lock.json" }}
25+
paths:
26+
- /home/circleci/repo/.npm # this is where the npm cache is stored when we use npm ci
27+
- run: npm run coverage
1828
upload-test-coverage:
1929
<<: *defaults
2030
steps:
2131
- codecov/upload:
22-
file: coverage/*.xml
32+
file: /home/circleci/repo/coverage/*.xml
2333
token: $CODECOV_TOKEN
2434

2535
workflows:
2636
node-tests:
2737
jobs:
28-
- node/test
2938
- generate-test-coverage-report
3039
- upload-test-coverage:
3140
requires:

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
"start": "react-scripts start",
3737
"build": "react-scripts build",
3838
"test": "react-scripts test",
39+
"coverage": "react-scripts test --coverage --watchAll=false",
3940
"eject": "react-scripts eject"
4041
},
4142
"eslintConfig": {

0 commit comments

Comments
 (0)