ci: use CircleCI workflow

This commit is contained in:
Evan You
2018-04-30 16:47:43 -04:00
parent fd9d255f65
commit 0d9f8421d7

View File

@@ -1,29 +1,73 @@
version: 2
defaults: &defaults
working_directory: ~/project/vue
docker:
- image: vuejs/ci
jobs:
build:
docker:
# specify the version you desire here
- image: vuejs/ci
working_directory: ~/repo
install:
<<: *defaults
steps:
- checkout
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "yarn.lock" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- v1-vue-{{ .Branch }}-{{ checksum "yarn.lock" }}
- v1-vue-{{ .Branch }}-
- v1-vue-
- run: yarn install
- save_cache:
key: v1-vue-{{ .Branch }}-{{ checksum "yarn.lock" }}
paths:
- node_modules
- node_modules/
- ~/.cache/yarn
key: v1-dependencies-{{ checksum "yarn.lock" }}
- persist_to_workspace:
root: ~/project
paths:
- vue
# run tests!
- run: yarn test
group-1:
<<: *defaults
steps:
- attach_workspace:
at: ~/project
- run: yarn test -p cli,cli-service,cli-shared-utils
group-2:
<<: *defaults
steps:
- attach_workspace:
at: ~/project
- run: yarn test -p typescript
group-3:
<<: *defaults
steps:
- attach_workspace:
at: ~/project
- run: yarn test -p cli-service-global,eslint,pwa,babel,babel-preset-app
group-4:
<<: *defaults
steps:
- attach_workspace:
at: ~/project
- run: yarn test -p unit-mocha,unit-jest,e2e-nightwatch,e2e-cypress
workflows:
version: 2
test:
jobs:
- install
- group-1:
requires:
- install
- group-2:
requires:
- install
- group-3:
requires:
- install
- group-4:
requires:
- install