-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
78 lines (64 loc) · 1.62 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
language: node_js
node_js:
- node
- 9
addons:
apt:
packages:
- xsel
services:
- redis-server
env:
SLACK_CI_TEST: true
before_install:
# - npm install yarn
- curl -o- -L https://yarnpkg.com/install.sh | bash
- export PATH="$HOME/.yarn/bin:$PATH"
- yarn config set cache-folder $HOME/.cache/yarn
install: yarn
# - yarn bootstrap
stages:
- lint
- depcheck
- test
# TODO
# - browser_test
before_script:
- 'if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export DISPLAY=:99.0; fi'
- 'if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sh -e /etc/init.d/xvfb start; sleep 3; fi'
# To avoid a problem when starting the Redis service
- sudo redis-server /etc/redis/redis.conf --port 6379
script:
# See https://jestjs.io/docs/en/troubleshooting.html#tests-are-extremely-slow-on-docker-and-or-continuous-integration-ci-server
- yarn test:force-exit --ci --coverage
- codecov
jobs:
include:
- stage: lint
script: yarn lint
# To lint the version 9 too
- stage: lint
node_js: 9
script: yarn lint
- stage: depcheck
script: yarn depcheck
# To lint the version 9 too
- stage: depcheck
node_js: 9
script: yarn depcheck
# TODO
# - stage: browser_test
# script: yarn test:coverage
# - stage: browser_test
# node_js: 9
# script: yarn test:coverage
cache:
yarn: true # This wouldn't do anything because it needs a yarn.lock
directories:
- $HOME/.nvm/.cache
- $HOME/.cache/yarn
- node_modules
- packages/**/node_modules
git:
# It's not necessary to get more than the last commit (and this branch alone)
depth: 1