forked from styleguidist/react-styleguidist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
74 lines (70 loc) · 2.02 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
62
63
64
65
66
67
68
69
70
71
72
73
74
language: node_js
node_js:
- 9
- 8
- 6
env:
- WEBPACK_VERSION= # Current, from package.json
- WEBPACK_VERSION=3
install:
# Use npm 5.7.x since it has introduced `npm ci`
- if [[ `npm -v` != 5.7* ]]; then npm install -g npm@'>=5.7.1'; fi
- npm ci
before_script:
# Install Webpack version
- if [[ -n "$WEBPACK_VERSION" ]]; then npm install --no-save webpack@$WEBPACK_VERSION; fi
script:
# Run tests without coverage since it's 2x faster
- npm run test:jest -- --runInBand
branches:
except:
- /^v\d+\.\d+\.\d+$/
stages:
- lint
- test
- integration
- coverage
- release
- name: documentation
if: branch = master
jobs:
include:
- stage: lint
script:
- npm run lint
- npx danger ci
- stage: integration
script:
# Compile JS
- npm run compile
# Build all examples
- npm run build:basic
- npm run build:customised
- npm run build:sections
# Check that examples really works: no JS errors on load
- npm run test:browser:pre
- npm run test:browser:basic
- npm run test:browser:customised
- npm run test:browser:sections
# Run integration tests with Cypress
- npm run test:cypress:pre
- npm run test:cypress:startServer &
- npm run test:cypress:startServer:post
- npm run test:cypress:run
- stage: coverage
script:
# Run tests with coverage
- npm run test:coverage -- --runInBand
# Upload coverage report to Codecov
- bash <(curl -s https://codecov.io/bash)
- stage: release
script:
- npm install --no-save semantic-release-tamia
- >-
npx semantic-release
--analyze-commits semantic-release-tamia/analyzeCommits
--verify-release semantic-release-tamia/verifyRelease
--generate-notes semantic-release-tamia/generateNotes
- stage: documentation
script:
- curl -X POST -d '{}' https://api.netlify.com/build_hooks/591308eba700c425fc1e8a54