foundation.mozilla.org/.travis.yml

75 строки
2.8 KiB
YAML
Executable File

language: python
python:
- '3.6'
addons:
postgresql: "9.6"
env:
global:
- ALLOWED_HOSTS=localhost
- CONTENT_TYPE_NO_SNIFF=True
- CORS_WHITELIST="*"
- DATABASE_URL=postgres://postgres@localhost:5432/network
- DEBUG=True
- DJANGO_SECRET_KEY=secret
- NETWORK_SITE_URL=https://foundation.mozilla.org
- PULSE_API_DOMAIN=https://network-pulse-api-production.herokuapp.com
- PULSE_DOMAIN=www.mozillapulse.org
- RANDOM_SEED=530910203
- SET_HSTS=False
- SSL_REDIRECT=False
- DOMAIN_REDIRECT_MIDDLEWARE_ENABLED=False
- TARGET_DOMAINS=foundation.mozilla.org
- USE_CLOUDINARY=false
- USE_S3=False
- X_FRAME_OPTIONS=DENY
- XSS_PROTECTION=True
- PIPENV_VERBOSITY=-1
- secure: mC4GYW8PC98k8BDqNoQDBAWkM90sRbe8yHfEhelL5YkvZC3ORZR8cbqzkAieShWf3upOc+xFMD3m8bsLvJGisg/CHm+j4f5d0shz0Sv5YG7Ru95TW4Hj/0H9QTlHG4OZ12hZ6ZD9k7xQdPL9CkKVordIQMH883UYdao9Tl5Y9i01uPpdAH/1mF6xpNHbVC6LjUv2zstoXqFCyABXaK2U3FqdymVhT1e99GlgVGteYTzsVEdv9AbhOaXH1U+0NLFOBhFVm1ub7zIZBrWgdZKStOiOlXdb14/oLw0criiOAULKBbN7WoKE3ZZTO5BR89+ZkOt7bH8gt9QCOTQ2JrhF00pIM7BoYxoWq6fLqsLdN0tJQ27QDlmH8PwOrJ6AqPKCj6wGBAjuNtLLu3QpsTeT0gJYGip3/aB9ktUFEPpGWjw7JMSvYGNvMAl+0tTiSL3sqxeyyBKvqQ8WH4bGtNRBDfrAmrxAcX4hCZCKgxsB9WiTSFnXdCb6axgmew1V3uMGUeQHcKaM7C8K2hrxnvUF/yeGuwJAgtFha9dn0AuG4ZarcEHmuVA6Wg+QAX1Niz885WecZuMlyguyuFGX3Bmz/Aa9jIvcTD+WOHiw3f6nNEoxJe3hkKKv5Sguq4j2gMoK/0fQ3AcnU4EYdUVoMJ/RgWN5ROowA+AwMy7GMTqOV+8=
cache:
pip: true
directories:
- "$HOME/.npm"
branches:
only:
- master
matrix:
include:
- name: "Python tests"
install: ./travis-scripts/python-install.sh
before_script:
- psql -c 'create database network;' -U postgres
script:
- pipenv run flake8 tasks.py network-api/
- pipenv run coverage run --source './network-api/networkapi' network-api/manage.py test networkapi
after_success:
- coveralls
- name: "npm tests"
before_install:
- nvm install --lts=carbon
- nvm use --lts=carbon
install: ./travis-scripts/npm-install.sh
script: npm test
- name: "Percy tests"
if: NOT TRAVIS_PULL_REQUEST_BRANCH =~ /^(dependabot\/)/
before_install:
- nvm install --lts=carbon
- nvm use --lts=carbon
install:
- ./travis-scripts/python-install.sh
- ./travis-scripts/npm-install.sh
before_script:
- psql -c 'create database network;' -U postgres
- npm run build
- pipenv run python network-api/manage.py collectstatic --no-input --verbosity 0
- pipenv run python network-api/manage.py migrate --no-input
- pipenv run python network-api/manage.py block_inventory
- pipenv run python network-api/manage.py sync_page_translation_fields
- pipenv run python network-api/manage.py update_translation_fields
- pipenv run python network-api/manage.py load_fake_data
script: npm run percy