Skip to content

Commit

Permalink
Circle Ci
Browse files Browse the repository at this point in the history
  • Loading branch information
tobob committed Jan 19, 2021
1 parent 92b3af9 commit 5712410
Showing 1 changed file with 66 additions and 5 deletions.
71 changes: 66 additions & 5 deletions .circleci/config.yml
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

0 comments on commit 5712410

Please sign in to comment.