forked from vue-styleguidist/vue-styleguidist
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
83 lines (71 loc) · 1.99 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
82
83
language: node_js
node_js:
- 10
- 9
- 6
cache: npm
# In order to avoid double build on pull requests,
# only build on pushes on master and on pushes on pull requests
branches:
only:
- master
before_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
script:
# Run tests without coverage since it's 2x faster
- npm run test:jest -- --runInBand
branches:
only:
- master
stages:
- lint
- test
- integration
- 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: 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: release
script:
- npm run compile
- npm install --no-save node-fetch semantic-release
- npx semantic-release
# Build & Deploy the documentation website
- stage: documentation
script:
- npm run docs:build
deploy:
provider: pages
skip-cleanup: true
local-dir: docs/dist
target-branch: master
repo: vue-styleguidist/vue-styleguidist.github.io
github-token: $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
keep-history: true
on:
branch: master