forked from mozilla/addons-frontend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
83 lines (80 loc) · 2.25 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
sudo: required
_aliases:
- &tox
language: python
python: 3.6
before_install: nvm install 8
install: pip install tox
script: tox
- &node-prod
# This is the NodeJS version we run in production.
language: node_js
node_js: '8'
before_install: npm install -g yarn
- &node-next
# This is the next NodeJS version we will support.
language: node_js
node_js: '10'
before_install: npm install -g yarn
services:
- docker
cache:
yarn: true
directories:
- node_modules
# Allow to display job names on Travis-CI, see:
# https://github.com/travis-ci/travis-ci/issues/5898#issuecomment-362490313
script: FORCE_COLOR=0 yarn $COMMAND
# See: https://github.com/mozilla/addons-frontend/issues/3034
install: yarn install --pure-lockfile
jobs:
include:
# Test the build process.
- stage:
<<: *node-prod
env: COMMAND=build-ci
- stage:
<<: *node-next
env: COMMAND=build-all
# Run the unit/integration tests.
- stage:
<<: *node-prod
env: COMMAND=test-ci
- stage:
<<: *node-next
env: COMMAND=test-ci
- stage:
<<: *node-prod
env: COMMAND=lint
- stage:
<<: *node-prod
env: COMMAND=snyk-ci
if: fork = false
- stage:
<<: *node-prod
env: COMMAND=prettier-ci
# Run the functional tests.
- stage:
<<: *tox
addons:
firefox: latest-nightly
hosts: example.com
env: TOXENV=discopane-ui-tests GECKODRIVER=0.21.0 MOZ_HEADLESS=1 PATH=./node_modules/.bin:$PATH
install:
- yarn
- yarn start-func-test-server &
before_script:
- wget -O /tmp/geckodriver.tar.gz https://github.com/mozilla/geckodriver/releases/download/v$GECKODRIVER/geckodriver-v$GECKODRIVER-linux64.tar.gz
- mkdir $HOME/geckodriver && tar xvf /tmp/geckodriver.tar.gz -C $HOME/geckodriver
- export PATH=$HOME/geckodriver:$PATH
- firefox --version
- geckodriver --version
- pip install tox
# Wait for server to be available
- until $(curl --output /dev/null --silent --head --fail -k https://example.com:4000); do printf '.'; sleep 5; done
- stage:
<<: *tox
env: TOXENV=flake8
- stage:
<<: *tox
env: TOXENV=dennis-lint