peterhudec/authomatic

View on GitHub
.travis.yml

Summary

Maintainability
Test Coverage
language: python
dist: bionic
sudo: true
cache:
  pip: true
addons:
  chrome: stable
  hosts:
  - authomatic.test
  - authomatic.com
  - authomatic.org
install:
- pip install tox
script:
# Call tox from venv, not system
- sudo $VIRTUAL_ENV/bin/tox -e py3
after_failure:
- tail -n 500 tests/functional_tests/*.log
- tail -n 500 flask.log
before_install:
- openssl aes-256-cbc -K $encrypted_dbe8ae205660_key -iv $encrypted_dbe8ae205660_iv
  -in ./tests/functional_tests/config_secret.py.enc -out ./tests/functional_tests/config_secret.py
  -d || true
before_deploy:
- travis/before_deploy.sh
deploy:
  - provider: pypi
    user: "__token__"
    # password: is defined via encrypted env var $PYPI_PASSWORD (stored on travis server)
    skip_cleanup: true
    distributions: "sdist bdist_wheel"
    on:
      # Travis considers branch == tag, but we can't use patterns in 'branch:'
      all_branches: true
      condition: $TRAVIS_TAG =~ ^(trigger-.*)$
  - provider: pages
    local_dir: doc/build/html
    target_branch: gh-pages
    skip_cleanup: true
    github_token: $GITHUB_TOKEN  # Set in the settings page of your repository, as a secure variable
    keep_history: true
    on:
      # Travis considers branch == tag, but we can't use patterns in 'branch:'
      all_branches: true
      condition: $TRAVIS_TAG =~ ^(trigger-.*)$
after_deploy:
- travis/after_deploy.sh