forked from styleguidist/react-styleguidist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
61 lines (61 loc) · 1.66 KB
/
.travis.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
50
51
52
53
54
55
56
57
58
59
60
61
language: node_js
node_js:
- 4
- 6
- 8
- 9
matrix:
allow_failures:
- node_js: 4
cache:
directories:
- node_modules
before_install:
# Upgrade npm
- if [[ `npm -v` != 5* ]]; then npm install -g npm@latest; fi
script:
# Run lint
- npm run lint
# Run tests and Danger.js
- |
if [[ "$TRAVIS_NODE_VERSION" == "4" ]]; then
NODE_ENV=test node --harmony-proxies $(npm bin)/jest --runInBand
else
if [[ "$TRAVIS_NODE_VERSION" == "9" ]]; then
npm run danger
npm run test:coverage -- --runInBand
else
npm run test:jest -- --runInBand
fi
fi
# Compile code
- npm run compile
# Build all examples
- npm run build
- npm run build:customised
- npm run build:sections
# Check that examples really works: no JS errors on load
- |
if [[ "$TRAVIS_NODE_VERSION" == "8" ]]; then
npm run test:browser:pre
npm run test:browser
npm run test:browser:customised
npm run test:browser:sections
fi
after_success:
# Make release with semantic-release if needed
- npm install -g semantic-release
- npm install --no-save semantic-release-tamia
- semantic-release --analyze-commits semantic-release-tamia/analyzeCommits --verify-release semantic-release-tamia/verifyRelease --generate-notes semantic-release-tamia/generateNotes
- |
if [[ "$TRAVIS_NODE_VERSION" == "9" ]]; then
# Upload coverage report to Codecov
bash <(curl -s https://codecov.io/bash)
# Update site
if [[ "$TRAVIS_BRANCH" == "master" ]]; then
curl -X POST -d '{}' https://api.netlify.com/build_hooks/591308eba700c425fc1e8a54
fi
fi
branches:
except:
- /^v\d+\.\d+\.\d+$/