зеркало из https://github.com/mozilla/treeherder.git
77 строки
2.5 KiB
YAML
77 строки
2.5 KiB
YAML
dist: xenial
|
|
# Use the latest Travis images since they are more up to date than the stable release.
|
|
group: edge
|
|
matrix:
|
|
include:
|
|
- env: js-tests
|
|
language: node_js
|
|
node_js: '11'
|
|
cache:
|
|
directories:
|
|
- node_modules
|
|
install:
|
|
- source ./bin/travis-setup.sh js_env
|
|
script:
|
|
# `yarn build` is tested as part of the Selenium job.
|
|
- yarn lint
|
|
# `yarn lint` only checks the formatting of JS/JSX, this will also check CSS/HTML/JSON/Markdown/YAML.
|
|
- yarn format:check
|
|
- yarn test
|
|
|
|
- env: python-linters
|
|
language: python
|
|
# Python 3.7 is blocked on Celery/kombu support (see bug 1529243)
|
|
python: '3.6.8'
|
|
cache:
|
|
directories:
|
|
- ${HOME}/venv
|
|
install:
|
|
- source ./bin/travis-setup.sh python_env docs
|
|
script:
|
|
- pip check
|
|
- python -bb lints/queuelint.py
|
|
- flake8 --show-source
|
|
- isort --check-only --diff --quiet
|
|
- git grep -El '^#!/.+\b(bash|sh)\b' | xargs shellcheck
|
|
- mkdocs build
|
|
|
|
- env: python-tests-main
|
|
language: python
|
|
python: '3.6.8'
|
|
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' python -bb ./manage.py check --deploy --fail-level WARNING
|
|
# Using `-bb` mode to surface BytesWarnings:
|
|
# https://docs.python.org/3.6/using/cmdline.html#cmdoption-b
|
|
- python -bb -m pytest tests/ --runslow --ignore=tests/selenium/
|
|
|
|
- env: python-tests-selenium
|
|
language: python
|
|
python: '3.6.8'
|
|
cache:
|
|
directories:
|
|
- ${HOME}/venv
|
|
- node_modules
|
|
install:
|
|
- nvm install 11
|
|
- source ./bin/travis-setup.sh services python_env browser 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:
|
|
- python -bb -m pytest tests/selenium/
|
|
|
|
notifications:
|
|
email:
|
|
on_success: never
|
|
on_failure: always
|