-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircle.yml
50 lines (40 loc) · 1.29 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
machine:
environment:
# Save mocha test results
MOCHA_FILE: "$CIRCLE_TEST_REPORTS/mocha.xml"
dependencies:
post:
# For some reason this plugin is not automatically installed inside the CircleCI container
- npm install eslint-plugin-import@latest
# Needed for proper mocha test results
- npm install mocha-circleci-reporter
- npm install codecov
# Needed for hosted API docs
- npm install esdoc-uploader
# Needed for npm publish
- npm install publish
test:
override:
# Lint files
- node_modules/.bin/eslint -f junit src > $CIRCLE_TEST_REPORTS/eslint.xml
# Run babel
- npm run compile
# Run mocha tests
- NODE_ENV=test node_modules/.bin/nyc npm test -- --reporter mocha-circleci-reporter
# Check coverage
- node_modules/.bin/nyc check-coverage --statements 90 --branches 90 --functions 90 --lines 90
# Report coverage
- node_modules/.bin/nyc report --reporter=lcov | node_modules/.bin/codecov
# Create API docs
- npm run docs
post:
# Save API docs
- cp -R docs/api $CIRCLE_ARTIFACTS
deployment:
release:
tag: /v[0-9]+(\.[0-9]+)*/
owner: ls-age
commands:
- echo -e "$NPM_USER\n$NPM_PASS\n$NPM_EMAIL" | npm login
- node_modules/.bin/publish
- node_modules/.bin/esdoc-uploader