-
Notifications
You must be signed in to change notification settings - Fork 353
/
.travis.yml
113 lines (105 loc) · 3.24 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
dist: trusty
# The fully visualised "sudo" GCE environments are faster for longer running jobs.
sudo: required
# Use the latest Travis images since they are more up to date than the stable release.
group: edge
matrix:
include:
# Job 1: Linters
- env: python2-linters
sudo: false
language: python
python: "2.7.14"
cache:
directories:
- ${HOME}/venv
install:
- source ./bin/travis-setup.sh python_env docs
script:
- pip check
- python lints/queuelint.py
- flake8 --show-source
- isort --check-only --diff --quiet
- git grep -El '^#!/.+\b(bash|sh)\b' | xargs shellcheck
- make -C docs html
# Job 2: Python 3 linters
- env: python3-linters
sudo: false
language: python
python: "3.6.3"
cache:
directories:
- ${HOME}/venv
install:
- source ./bin/travis-setup.sh python_env
script:
- pip check
# Job 3: Nodejs UI tests
- env: ui-tests
language: node_js
node_js: "8"
cache:
directories:
- node_modules
install:
- source ./bin/travis-setup.sh js_env
script:
- yarn test
- yarn build
# Job 4: Python Tests Chunk A
- env: python-tests-main
language: python
python: "2.7.14"
cache:
directories:
- ${HOME}/venv
install:
- source ./bin/travis-setup.sh services python_env
# Create the test database for `manage.py check --deploy`.
- mysql -u root -e 'create database test_treeherder;'
script:
# Several security features in settings.py (eg setting HSTS headers) are conditional on
# 'https://' being in the site URL. In addition, we override the test environment's debug
# value so the tests pass. The real environment variable will be checked during deployment.
- SITE_URL='https://treeherder.dev' TREEHERDER_DEBUG='False' ./manage.py check --deploy --fail-level WARNING
- pytest tests/ --runslow --ignore=tests/etl/ --ignore=tests/log_parser/ --ignore=tests/webapp/api/ --ignore=tests/selenium/ --ignore=tests/jenkins/
# Job 5: Python Tests Chunk B
- env: python-tests-etl-logparser
language: python
python: "2.7.14"
cache:
directories:
- ${HOME}/venv
install:
- source ./bin/travis-setup.sh services python_env
script:
- pytest tests/etl/ tests/log_parser/ --runslow
# Job 6: Python Tests Chunk C
- env: python-tests-rest-api
language: python
python: "2.7.14"
cache:
directories:
- ${HOME}/venv
install:
- source ./bin/travis-setup.sh services python_env
script:
- pytest tests/webapp/api/ --runslow
# Job 7: Python Tests - Selenium integration
- env: python-tests-selenium
language: python
python: "2.7.14"
cache:
directories:
- ${HOME}/venv
- node_modules
install:
- nvm install 8
- source ./bin/travis-setup.sh services python_env geckodriver js_env
script:
- yarn build
- pytest tests/selenium/ --driver Firefox
notifications:
email:
on_success: never
on_failure: always