-
Notifications
You must be signed in to change notification settings - Fork 0
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
Pedro Rosario
authored
Jul 3, 2019
1 parent
eaafcd1
commit f0b0e75
Showing
1 changed file
with
34 additions
and
17 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 |
---|---|---|
@@ -1,27 +1,44 @@ | ||
version: 2 | ||
general: | ||
artifacts: | ||
- coverage | ||
|
||
# Set defaults to reuse | ||
defaults: &defaults | ||
working_directory: ~/repo | ||
docker: | ||
- image: circleci/node:8.10.0 | ||
|
||
jobs: | ||
build: | ||
docker: | ||
# specify the version you desire here | ||
- image: node:8.10.0 | ||
working_directory: ~/repo | ||
test: | ||
<<: *defaults | ||
steps: | ||
- checkout | ||
# 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- | ||
- v2-dependencies-{{ checksum "package.json" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v2-dependencies- | ||
|
||
- run: npm install | ||
- run: | ||
name: Run tests | ||
command: npm test | ||
- run: | ||
name: Send to Coveralls | ||
command: cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js | ||
- save_cache: | ||
paths: | ||
- node_modules | ||
key: v1-dependencies-{{ checksum "package.json" }} | ||
# run tests | ||
- run: npm test | ||
# send to coveralls | ||
- run: cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js | ||
key: v2-dependencies-{{ checksum "package.json" }} | ||
|
||
- persist_to_workspace: | ||
root: ~/repo | ||
paths: | ||
- "." | ||
|
||
workflows: | ||
version: 2 | ||
test-deploy: | ||
jobs: | ||
- test: | ||
filters: | ||
tags: | ||
only: /^v[0-9]+\.[0-9]+\.[0-9]+/ |