forked from magicmark/react-styleguidist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
81 lines (71 loc) · 2.13 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
75
76
77
78
79
80
81
language: node_js
node_js:
- 9
- 8
- 6
addons:
apt:
packages:
- libgconf-2-4
before_install:
# Use npm 6.9.x since it has introduced `npm ci`
- if [[ `npm -v` != 6.9* ]]; then npm install -g npm@'>=6.9'; fi
script:
# Run tests without coverage since it's 2x faster
- npm run test:jest -- --runInBand
# Trigger a push build on master branches only + PRs build on every branches
# Avoid double build on PRs (See https://github.com/travis-ci/travis-ci/issues/1147)
branches:
only:
- master
stages:
- lint
- test
- typecheck
- integration
- coverage
- name: release
if: type != pull_request AND branch = master
- name: documentation
if: type != pull_request AND branch = master
jobs:
include:
- stage: lint
script:
- npm run lint
- npx danger ci
- stage: typecheck
script:
- npm run flow check
- 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