Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use circleci instead of travis for ci (#1996)
- Loading branch information
1 parent
6491189
commit 56063d5
Showing
5 changed files
with
147 additions
and
21 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,138 @@ | ||
version: 2.1 | ||
|
||
executors: | ||
my-executor: | ||
docker: | ||
- image: circleci/node:11 | ||
environment: | ||
CI: true | ||
working_directory: ~/mobx | ||
|
||
jobs: | ||
build: | ||
executor: my-executor | ||
steps: | ||
- checkout | ||
|
||
- restore_cache: | ||
name: restore .cache/yarn | ||
keys: | ||
- yarn-cache-{{ arch }} | ||
- restore_cache: | ||
name: restore node_modules | ||
keys: | ||
- node-modules-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }} | ||
- node-modules-{{ arch }}-{{ .Branch }} | ||
- node-modules-{{ arch }} | ||
|
||
- run: yarn install --frozen-lockfile --cache-folder ~/.cache/yarn | ||
|
||
- save_cache: | ||
name: cache .cache/yarn | ||
key: yarn-cache-{{ arch }} | ||
paths: | ||
- ~/.cache/yarn | ||
- save_cache: | ||
name: cache node_modules | ||
key: node-modules-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }} | ||
paths: | ||
- node_modules | ||
|
||
- run: yarn small-build | ||
|
||
- persist_to_workspace: | ||
root: . | ||
paths: | ||
- ./* | ||
|
||
test-all: | ||
executor: my-executor | ||
steps: | ||
- attach_workspace: | ||
at: . | ||
|
||
- run: yarn test:all | ||
|
||
test-performance: | ||
executor: my-executor | ||
steps: | ||
- attach_workspace: | ||
at: . | ||
|
||
- run: | ||
command: time node --expose-gc test/perf/index.js | ||
environment: | ||
PERSIST: true | ||
|
||
test-coverage: | ||
executor: my-executor | ||
steps: | ||
- attach_workspace: | ||
at: . | ||
|
||
- run: yarn test -i --coverage | ||
- persist_to_workspace: | ||
root: . | ||
paths: | ||
- ./coverage | ||
|
||
test-webpack: | ||
executor: my-executor | ||
steps: | ||
- attach_workspace: | ||
at: . | ||
|
||
- run: yarn test:webpack | ||
|
||
test-size: | ||
executor: my-executor | ||
steps: | ||
- attach_workspace: | ||
at: . | ||
|
||
- run: yarn size | ||
|
||
# upload coverage | ||
upload-coveralls: | ||
executor: my-executor | ||
steps: | ||
- attach_workspace: | ||
at: . | ||
|
||
# only run coveralls if the token is present (it is not present for fork PRs for security reasons) | ||
- run: | ||
name: upload coveralls | ||
command: | | ||
if [[ -v COVERALLS_REPO_TOKEN ]] | ||
then | ||
cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js | ||
echo "Coveralls info uploaded" | ||
else | ||
echo "Warning - Coveralls info could NOT be uploaded since the COVERALLS_REPO_TOKEN was not available" | ||
fi | ||
workflows: | ||
version: 2 | ||
build-and-test: | ||
jobs: | ||
- build | ||
|
||
- test-all: | ||
requires: | ||
- build | ||
- test-performance: | ||
requires: | ||
- build | ||
- test-coverage: | ||
requires: | ||
- build | ||
- test-webpack: | ||
requires: | ||
- build | ||
- test-size: | ||
requires: | ||
- build | ||
|
||
- upload-coveralls: | ||
requires: | ||
- test-coverage |
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 was deleted.
Oops, something went wrong.
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