Skip to content

Commit eac2c3e

Browse files
committedJan 16, 2018
chore(ci): migrate to CircleCI 2.0
1 parent fef51b4 commit eac2c3e

File tree

4 files changed

+62
-17
lines changed

4 files changed

+62
-17
lines changed
 

‎.circleci/config.yml

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
version: 2
2+
3+
defaults: &defaults
4+
working_directory: ~/project/easy-mock
5+
docker:
6+
- image: circleci/node:8.9.1
7+
- image: circleci/mongo:3.4
8+
- image: redis:4.0.1
9+
10+
jobs:
11+
install:
12+
<<: *defaults
13+
steps:
14+
- checkout
15+
- restore_cache:
16+
keys:
17+
- v1-easy-mock-{{ .Branch }}-{{ checksum "package-lock.json" }}
18+
- v1-easy-mock-{{ .Branch }}-
19+
- v1-easy-mock-
20+
- run: npm install
21+
- save_cache:
22+
key: v1-easy-mock-{{ .Branch }}-{{ checksum "package-lock.json" }}
23+
paths:
24+
- node_modules/
25+
- persist_to_workspace:
26+
root: ~/project
27+
paths:
28+
- easy-mock
29+
30+
lint:
31+
<<: *defaults
32+
steps:
33+
- attach_workspace:
34+
at: ~/project
35+
- run: npm run lint
36+
37+
test-cover:
38+
<<: *defaults
39+
steps:
40+
- attach_workspace:
41+
at: ~/project
42+
- run: npm run test:cover
43+
- run:
44+
name: report coverage stats for non-PRs
45+
command: |
46+
if [[ -z $CI_PULL_REQUEST ]]; then
47+
cat ./coverage/lcov.info | ./node_modules/.bin/codecov
48+
fi
49+
50+
workflows:
51+
version: 2
52+
install-and-test:
53+
jobs:
54+
- install
55+
- lint:
56+
requires:
57+
- install
58+
- test-cover:
59+
requires:
60+
- install

‎build/ci.sh

-8
This file was deleted.

‎circle.yml

-7
This file was deleted.

‎package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
"main": "app.js",
66
"scripts": {
77
"test": "node test/gen && cross-env NODE_ENV=test jest --runInBand --forceExit",
8-
"test-watch": "npm run test -- --watch",
9-
"test-cov": "npm run test -- --coverage",
8+
"test:watch": "npm run test -- --watch",
9+
"test:cover": "npm run test -- --coverage",
1010
"lint": "eslint --ignore-path .gitignore . --quiet --ext .vue,.js",
1111
"dev": "nodemon --ignore views/ --ignore public/ app",
1212
"dev:client": "node app",

0 commit comments

Comments
 (0)