-
Notifications
You must be signed in to change notification settings - Fork 1
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
1 changed file
with
66 additions
and
5 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,7 +1,68 @@ | ||
version: 2.1 | ||
orbs: | ||
node: circleci/node@3.0.0 | ||
# Javascript CircleCI 2.0 configuration file | ||
# | ||
# Check https://circleci.com/docs/2.0/language-javascript/ for more details | ||
|
||
version: 2.0 | ||
|
||
jobs: | ||
checkout_code: | ||
docker: | ||
- image: circleci/node:12.18.3-stretch-browsers | ||
working_directory: ~/just-walking | ||
steps: | ||
- checkout | ||
- save_cache: | ||
key: v1-repo-{{ .Environment.CIRCLE_SHA1 }} | ||
paths: | ||
- ~/just-walking | ||
|
||
install_packages: | ||
docker: | ||
- image: circleci/node:12.18.3-stretch-browsers | ||
working_directory: ~/just-walking | ||
steps: | ||
- restore_cache: | ||
key: v1-repo-{{ .Environment.CIRCLE_SHA1 }} | ||
- restore_cache: | ||
keys: | ||
- yarn-packages-v3-{{ checksum "yarn.lock" }} | ||
- run: | ||
name: Install yarn pacakges | ||
command: yarn | ||
- save_cache: # special step to save the dependency cache | ||
name: Save Yarn Package Cache | ||
key: yarn-packages-v3-{{ checksum "yarn.lock" }} | ||
paths: | ||
- node_modules | ||
|
||
tests: | ||
docker: | ||
- image: circleci/node:12.18.3-stretch-browsers | ||
working_directory: ~/just-walking | ||
steps: | ||
- restore_cache: | ||
key: v1-repo-{{ .Environment.CIRCLE_SHA1 }} | ||
- restore_cache: | ||
keys: | ||
- yarn-packages-v3-{{ checksum "yarn.lock" }} | ||
- run: | ||
name: test | ||
command: yarn test --maxWorkers=2 | ||
- store_artifacts: # special step to save test results as as artifact | ||
path: test-results.xml | ||
prefix: tests | ||
- store_test_results: # special step to upload test results for display in Test Summary | ||
path: test-results.xml | ||
|
||
|
||
workflows: | ||
node-tests: | ||
version: 2 | ||
build-and-test: | ||
jobs: | ||
- node/test | ||
- checkout_code | ||
- install_packages: | ||
requires: | ||
- checkout_code | ||
- tests: | ||
requires: | ||
- install_packages |