Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #179 from peopledoc/travis-deploy
Rewrite travis.yml file
- Loading branch information
Showing
1 changed file
with
52 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,75 @@ | ||
# Config file for automatic testing at travis-ci.org | ||
language: python | ||
os: linux | ||
dist: xenial | ||
language: python | ||
cache: pip | ||
|
||
addons: | ||
postgresql: "10" | ||
|
||
env: | ||
global: | ||
- PGHOST=localhost | ||
- PGUSER=postgres | ||
- PYTEST_ADDOPTS="--cov-append" | ||
|
||
matrix: | ||
include: | ||
|
||
- python: 3.6 | ||
env: | ||
TOX_ENV: py36-unit-tests,py36-integration-tests,py36-acceptance-tests | ||
|
||
- python: 3.7 | ||
env: | ||
TOX_ENV: py37-unit-tests,py37-integration-tests,py37-acceptance-tests | ||
|
||
- python: 3.8 | ||
env: | ||
TOX_ENV: py38-unit-tests,py38-integration-tests,py38-acceptance-tests | ||
|
||
- python: 3.8 | ||
env: | ||
TOX_ENV: check-lint | ||
|
||
- python: 3.8 | ||
env: | ||
TOX_ENV: docs | ||
PGHOST=localhost | ||
PGUSER=postgres | ||
PYTEST_ADDOPTS="--cov-append" | ||
|
||
# Taken from https://github.com/travis-ci/travis-ci/issues/9624 | ||
before_install: | ||
- sudo sed -i -e '/local.*peer/s/postgres/all/' -e 's/peer\|md5/trust/g' /etc/postgresql/*/main/pg_hba.conf | ||
- sudo service postgresql restart | ||
- sleep 1 | ||
script: | ||
- tox -e $TOX_ENV | ||
|
||
install: | ||
- pip install tox codecov | ||
- tox --notest -e $TOX_ENV | ||
|
||
script: | ||
- tox -e $TOX_ENV | ||
|
||
after_success: | ||
- codecov | ||
|
||
jobs: | ||
include: | ||
- stage: test | ||
addons: | ||
postgresql: "10" | ||
apt: | ||
packages: | ||
- postgresql-10 | ||
- postgresql-client-10 | ||
python: 3.6 | ||
env: | ||
TOX_ENV: py36-unit-tests,py36-integration-tests,py36-acceptance-tests | ||
|
||
- python: 3.7 | ||
addons: | ||
postgresql: "10" | ||
apt: | ||
packages: | ||
- postgresql-10 | ||
- postgresql-client-10 | ||
env: | ||
TOX_ENV: py37-unit-tests,py37-integration-tests,py37-acceptance-tests | ||
|
||
- python: 3.8 | ||
addons: | ||
postgresql: "10" | ||
apt: | ||
packages: | ||
- postgresql-10 | ||
- postgresql-client-10 | ||
env: | ||
TOX_ENV: py38-unit-tests,py38-integration-tests,py38-acceptance-tests | ||
|
||
- python: 3.8 | ||
env: | ||
TOX_ENV: check-lint | ||
|
||
- python: 3.8 | ||
env: | ||
TOX_ENV: docs | ||
|
||
- stage: deploy | ||
if: branch = master AND tag IS present | ||
python: 3.8 | ||
before_install: true | ||
script: true | ||
install: true | ||
after_success: true | ||
deploy: | ||
provider: pypi | ||
user: __token__ | ||
username: __token__ | ||
password: | ||
secure: "hqUrw49Q2jdZ9cYWvI6/1pL9lGGnbHIxGdQtFRFSDLS7DhvI48FwuPD4swxALJIDnCnz99NdpZ5hRDcn95TUhTnhNGCDBOqHkFnu17H1TMZGgq21vZpGABgBpJ26RezmIIL463VcGbwbI88uNR815hKUw1hA/AUGdT4cKseqk/icsMTFfZYijxfJO/sItprFxF63VXNIj8Xv4BAof94Lw1gJII+VzCBZ51eA3jisttjXxKufuhdqPcnSFLh3YQ1JvXoPv5W1V+yIMcAa4Sm+UaEPsY/UMMAixJSBFEUJtEaiOHE4IxJb2GZauLa5mDzQKS7pULBcAi1moBthxkK35DDzXwaM1FVM1pFeoCSeHy9sTUEGnayKMaHMeqrrq0qg1G8H7EUI/4l9TMJdQif/joLM8QS80F3Wdk9hUzCTU5fkn6xcZYdynAoFc3IYXBbAUkcVTlLX+FGFWFfXoNx/sUFRxM+vElPxGNNG7Es+rHCGjTXhAYm+7sMvcD/UWKyWWvwdQkHOhmLhrKwbb99Kescfy0Z4b3NxlERo1IgtzWQwTGgM6FwxMUQS89hHcCZm2Q0vSKiFJMHLMqoxSqCPcDTegF6HtjWSdHFtUArbe3nWOu5GBEz6kNOjdRBh8Czh6bcbHFqnsP42QNfH6mCTYJKCU/zTdLusJnVCUAh+v8Q=" | ||
on: | ||
branch: master | ||
tags: true |