Skip to content

Commit aadbb56

Browse files
committed
ci: use circle ci 2
1 parent 78924f2 commit aadbb56

File tree

2 files changed

+73
-1
lines changed

2 files changed

+73
-1
lines changed

Diff for: .circleci/config.yml

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
version: 2
2+
3+
defaults: &defaults
4+
working_directory: ~/project/vue-router
5+
docker:
6+
- image: circleci/node:8-browsers
7+
8+
jobs:
9+
install:
10+
<<: *defaults
11+
steps:
12+
- checkout
13+
- restore_cache:
14+
keys:
15+
- v1-vue-{{ .Branch }}-{{ checksum "package-lock.json" }}
16+
- v1-vue-{{ .Branch }}-
17+
- v1-vue-
18+
- run: npm install
19+
- save_cache:
20+
key: v1-vue-{{ .Branch }}-{{ checksum "package-lock.json" }}
21+
paths:
22+
- node_modules/
23+
- persist_to_workspace:
24+
root: ~/project
25+
paths:
26+
- vue-router
27+
28+
lint-flow-types:
29+
<<: *defaults
30+
steps:
31+
- attach_workspace:
32+
at: ~/project
33+
- run: npm run lint
34+
- run: npm run flow
35+
- run: npm run test:types
36+
37+
test-unit:
38+
<<: *defaults
39+
steps:
40+
- attach_workspace:
41+
at: ~/project
42+
- run: npm run test:unit
43+
# add codecov once it is actually ran
44+
# - run:
45+
# name: report coverage stats for non-PRs
46+
# command: |
47+
# if [[ -z $CI_PULL_REQUEST ]]; then
48+
# ./node_modules/.bin/codecov
49+
# fi
50+
51+
test-e2e:
52+
<<: *defaults
53+
steps:
54+
- attach_workspace:
55+
at: ~/project
56+
- run: npm run test:e2e
57+
58+
workflows:
59+
version: 2
60+
install-and-parallel-test:
61+
jobs:
62+
- install
63+
- test-unit:
64+
requires:
65+
- install
66+
- lint-flow-types:
67+
requires:
68+
- install
69+
- test-e2e:
70+
requires:
71+
- install

Diff for: package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,8 @@
2727
"dev:dist": "rollup -wm -c build/rollup.dev.config.js",
2828
"build": "node build/build.js",
2929
"lint": "eslint src examples",
30-
"test": "npm run lint && flow check && npm run test:unit && npm run test:e2e && npm run test:types",
30+
"test": "npm run lint && npm run flow && npm run test:unit && npm run test:e2e && npm run test:types",
31+
"flow": "flow check",
3132
"test:unit": "jasmine JASMINE_CONFIG_PATH=test/unit/jasmine.json",
3233
"test:e2e": "node test/e2e/runner.js",
3334
"test:types": "tsc -p types/test",

0 commit comments

Comments
 (0)