Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from glorious-codes/ci_config
Run ci jobs in parallel
- Loading branch information
Showing
2 changed files
with
46 additions
and
12 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,37 +1,71 @@ | ||
# Javascript Node CircleCI 2.0 configuration file | ||
# Check https://circleci.com/docs/2.0/language-javascript/ for more details | ||
version: 2.1 | ||
|
||
orbs: | ||
coveralls: coveralls/coveralls@1.0.6 | ||
jobs: | ||
build: | ||
docker: | ||
- image: circleci/node:latest-browsers | ||
|
||
defaults: &defaults | ||
docker: | ||
- image: circleci/node:latest-browsers | ||
working_directory: ~/glorious-triven | ||
|
||
jobs: | ||
install: | ||
<<: *defaults | ||
steps: | ||
- checkout | ||
# Download and cache dependencies | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "package.json" }} | ||
- v1-dependencies-{{ checksum "package-lock.json" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v1-dependencies- | ||
|
||
- run: | ||
name: Install | ||
command: npm install | ||
|
||
- save_cache: | ||
paths: | ||
- node_modules | ||
key: v1-dependencies-{{ checksum "package.json" }} | ||
key: v1-dependencies-{{ checksum "package-lock.json" }} | ||
- persist_to_workspace: | ||
root: "." | ||
paths: | ||
- "package.json" | ||
- "package-lock.json" | ||
- "jest.*.js" | ||
- ".babelrc" | ||
- ".eslintrc" | ||
- "node_modules" | ||
- ".git/*" | ||
- ".circleci/*" | ||
- "src/*" | ||
|
||
format: | ||
<<: *defaults | ||
steps: | ||
- attach_workspace: | ||
at: ~/glorious-triven | ||
- run: | ||
name: Format | ||
command: npm run format | ||
|
||
test: | ||
<<: *defaults | ||
steps: | ||
- attach_workspace: | ||
at: ~/glorious-triven | ||
- run: | ||
name: Test | ||
command: npm run test -- --maxWorkers=2 --coverage --coverageReporters=lcov | ||
- coveralls/upload: | ||
verbose: true | ||
|
||
- coveralls/upload | ||
workflows: | ||
version: 2 | ||
branch-workflow: | ||
jobs: | ||
- install | ||
- format: | ||
requires: | ||
- install | ||
- test: | ||
requires: | ||
- install |
File renamed without changes.