-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Javascript Node CircleCI 2.0 configuration file | ||
|
||
version: 2 | ||
jobs: | ||
build: | ||
docker: | ||
- image: circleci/node:10.15.3 | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: ~/repo/tmp | ||
- run: npm install | ||
|
||
- run: | ||
name: Download cc-test-reporter | ||
command: | | ||
mkdir -p tmp/ | ||
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./tmp/cc-test-reporter | ||
chmod +x ./tmp/cc-test-reporter | ||
- persist_to_workspace: | ||
root: tmp | ||
paths: | ||
- cc-test-reporter | ||
# Download and cache dependencies | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "package.json" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v1-dependencies- | ||
|
||
- save_cache: | ||
paths: | ||
- node_modules | ||
key: v1-dependencies-{{ checksum "package.json" }} | ||
|
||
- run: | ||
name: Run frontend tests | ||
command: | | ||
npm run test | ||
./tmp/cc-test-reporter format-coverage -t lcov -o tmp/codeclimate.frontend.json coverage/lcov.info | ||
- run: | ||
name: Upload coverage results to Code Climate | ||
command: | | ||
./tmp/cc-test-reporter upload-coverage -i tmp/codeclimate.frontend.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters