Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate CI config to CircleCI v2 #212

Merged
merged 6 commits into from
Dec 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 77 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
version: 2.1
executors:
node-10:
docker:
- image: circleci/node:10

jobs:
install-dependencies:
executor: node-10
steps:
- checkout
- restore_cache:
keys:
# if lock file changes, we still use increasingly general patterns to restore cache
- yarn-cache-lib-{{ .Branch }}-{{ checksum "yarn.lock" }}
- yarn-cache-lib-{{ .Branch }}-
- run:
name: Install dependencies
command: |
yarn --version
yarn install --frozen-lockfile
- save_cache:
key: yarn-cache-lib-{{ .Branch }}-{{ checksum "yarn.lock" }}
paths:
- ~/.yarn
- ~/.cache/yarn
- ./node_modules
- persist_to_workspace:
root: .
paths: .

test-library:
executor: node-10
steps:
- attach_workspace:
at: .
- run:
name: Test Library
command: yarn test:ci

install-test-example:
executor: node-10
steps:
- attach_workspace:
at: .
- restore_cache:
keys:
- yarn-cache-example-{{ .Branch }}-{{ checksum "yarn.lock" }}
- yarn-cache-example-{{ .Branch }}-
- run:
name: Install Example Dependencies
command: |
cd example
yarn install --frozen-lockfile
- save_cache:
key: yarn-cache-example-{{ .Branch }}-{{ checksum "yarn.lock" }}
paths:
- ./example/node_modules
- run:
name: Test Example
command: |
cd example
yarn test:ci
yarn test:coverage

workflows:
version: 2
install-and-test:
jobs:
- install-dependencies
- test-library:
requires:
- install-dependencies
- install-test-example:
requires:
- install-dependencies

23 changes: 0 additions & 23 deletions circle.yml

This file was deleted.