-
Notifications
You must be signed in to change notification settings - Fork 805
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
1 parent
b1dc1a3
commit ab9573e
Showing
7 changed files
with
89 additions
and
41 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,36 +1,88 @@ | ||
version: 2 | ||
|
||
unit_tests: &unit_tests | ||
steps: | ||
- checkout | ||
- run: | ||
name: Create Checksum | ||
command: sh .circleci/checksum.sh /tmp/checksums.txt | ||
- restore_cache: | ||
keys: | ||
- npm-cache-{{ checksum "/tmp/checksums.txt" }} | ||
- run: | ||
name: Install Dependencies | ||
command: yarn install | ||
- save_cache: | ||
key: npm-cache-{{ checksum "/tmp/checksums.txt" }} | ||
paths: | ||
- ./node_modules | ||
- ./yarn.lock | ||
- ./packages/*/node_modules | ||
- ./packages/*/yarn.lock | ||
- run: | ||
name: Compile code | ||
command: yarn compile | ||
- run: | ||
name: Unit tests | ||
command: yarn test:node | ||
- run: | ||
name: report coverage | ||
command: yarn codecov | ||
|
||
browsers_unit_tests: &browsers_unit_tests | ||
steps: | ||
- checkout | ||
- run: | ||
name: Install Dependencies | ||
command: yarn install | ||
- run: | ||
name: Compile code | ||
command: yarn compile | ||
- run: | ||
name: Unit tests | ||
command: yarn test:browser | ||
|
||
jobs: | ||
build: | ||
lint: | ||
docker: | ||
- image: circleci/node:12-browsers | ||
- image: node | ||
steps: | ||
- checkout | ||
- run: | ||
name: Create Checksum | ||
command: sh .circleci/checksum.sh /tmp/checksums.txt | ||
- restore_cache: | ||
keys: | ||
- npm-cache-{{ checksum "/tmp/checksums.txt" }} | ||
- run: | ||
name: Install Dependencies | ||
name: Install modules and dependencies. | ||
command: yarn install | ||
- save_cache: | ||
key: npm-cache-{{ checksum "/tmp/checksums.txt" }} | ||
paths: | ||
- ./node_modules | ||
- ./yarn.lock | ||
- ./packages/*/node_modules | ||
- ./packages/*/yarn.lock | ||
- run: | ||
name: Lint | ||
name: Check code style and linting | ||
command: yarn run check | ||
- run: | ||
name: Compile | ||
command: yarn compile | ||
- run: | ||
name: Test | ||
command: yarn test | ||
- run: | ||
name: report-coverage | ||
command: yarn codecov | ||
node8: | ||
docker: | ||
- image: node:8 | ||
<<: *unit_tests | ||
node10: | ||
docker: | ||
- image: node:10 | ||
<<: *unit_tests | ||
node11: | ||
docker: | ||
- image: node:11 | ||
<<: *unit_tests | ||
node12: | ||
docker: | ||
- image: node:12 | ||
<<: *unit_tests | ||
node12-browsers: | ||
docker: | ||
- image: circleci/node:12-browsers | ||
<<: *browsers_unit_tests | ||
|
||
|
||
workflows: | ||
version: 2 | ||
build: | ||
jobs: | ||
- lint | ||
- node8 | ||
- node10 | ||
- node11 | ||
- node12 | ||
- node12-browsers |
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
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
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