treeherder/.travis.yml

116 строки
3.4 KiB
YAML
Исходник Обычный вид История

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.4"
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
before_script:
# Run in `before_script` to prevent the selenium tests from still being run if the UI build fails.
- yarn build
script:
2017-11-09 00:44:34 +03:00
- pytest tests/selenium/ --driver Firefox
2013-06-27 20:57:44 +04:00
notifications:
email:
on_success: never
on_failure: always