Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 97 lines (90 sloc) 4.09 KB
dist: xenial
language: python
python:
- "3.7"
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"
- "$HOME/.cache/pipenv"
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
before_install:
# libgconf is required by cypress
- sudo apt-get install -y libgconf-2-4
- nvm install --lts=carbon
- nvm use --lts=carbon
install:
- "./travis-scripts/python-install.sh"
- "./travis-scripts/npm-install.sh"
- npm run cypress:install
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
- stage: Deploy
name: Deploy Maintenance page to S3
script: skip
deploy:
provider: s3
access_key_id: "AKIAIDLSQZEZHN7MPGKA"
secret_access_key:
secure: 41kXOgS58Ew64cXRE8KfDWMIAaSHdab/x2e0Pkv0pzEcEAbZloY2I6qlGs+K1JuK68WCicivU1cgmxgqSlA+Ol9cl3LD+XyeQsZqeIiYw9exZVHy1b49I2GPrW32mooasndJd29GNEqLfC5C1PuiVv4Ixs6USeshDH7+/SUFswO4A08F2S0C9r0bAhc9ff2TpsCSGBMNB9QgXvKnKvWB1S+mGbf9anrfJlPV0G6/PrMhldrVUrIULZidbiJuaW2FoKlt0YkEBYdzM+gdNI88VHRSrBnbbZrMs26sd4XBUtSeZcFA2QWnkfltRWLjpmPQWd6lcA53T7jNRr9z89HjEkxtz9N3Rb7qT1fuDwc6f9+5lj9G+kzxSeOoVBDNRNmhHTlEUIbODP80jcbr2GCCs6NgKq4yKApiA1lHA3REooBbGzkc53WtXfITDfK7h6BDDsJyGxBbU2gS66vvmGkv//wdXMsEwTfnmx0oHeQS1ad5emvOJSLIJXtCAqepStEBIhWRnN0ZCDhNTMoz63qE3Ne0KQhHX9j7UBLw7MRy6qGm2+Kd8ok2akqw8WUpQtUkgoxJzMHdx8BEYrFjfWEXnhqGriwWYRCNVI2MK53sE7ia8lzOil4jDAFURtRq7sJBBbgufc010gSHdBdcqm3haYr0XUgebR7hs2BD45+kVZA=
bucket: "foundation-mozilla-org-maintenance"
region: us-east-1
acl: public_read
local_dir: maintenance
on:
branch: master
condition: "$TRAVIS_EVENT_TYPE != pull_request"
You can’t perform that action at this time.