Skip to content

Commit

Permalink
💚 fix circleci config.yml
Browse files Browse the repository at this point in the history
💚 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
  • Loading branch information
JacobGrisham committed Jul 25, 2021
1 parent 03dfcaa commit ef2be3a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
19 changes: 14 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,39 @@ version: 2.1

defaults: &defaults
docker:
- image: circleci/node:8.11
- image: circleci/node:14.16.1
working_directory: ~/repo

orbs:
node: circleci/node@3.0.0
codecov: codecov/codecov@1.2.3

jobs:
generate-test-coverage-report:
<<: *defaults
steps:
- checkout
- run: npm test -- --coverage
- restore_cache: # restores any cache that is available from a previous build
keys:
- robofriends-cache-v1-{{ checksum "package-lock.json" }}
- robofriends-cache-v1- # if only a few changes, then don't rebuild entire node modules
- run:
name: Installing React Dependencies
command: npm install
- save_cache: # save our cache of the npm dependencies
key: robofriends-cache-v1-{{ checksum "package-lock.json" }}
paths:
- /home/circleci/repo/.npm # this is where the npm cache is stored when we use npm ci
- run: npm run coverage
upload-test-coverage:
<<: *defaults
steps:
- codecov/upload:
file: coverage/*.xml
file: /home/circleci/repo/coverage/*.xml
token: $CODECOV_TOKEN

workflows:
node-tests:
jobs:
- node/test
- generate-test-coverage-report
- upload-test-coverage:
requires:
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"coverage": "react-scripts test --coverage --watchAll=false",
"eject": "react-scripts eject"
},
"eslintConfig": {
Expand Down

0 comments on commit ef2be3a

Please sign in to comment.