Skip to content

Commit

Permalink
Merge pull request #179 from peopledoc/travis-deploy
Browse files Browse the repository at this point in the history
Rewrite travis.yml file
  • Loading branch information
Joachim Jablon committed Apr 3, 2020
2 parents a778786 + 559947f commit 9e67b4f
Showing 1 changed file with 52 additions and 42 deletions.
94 changes: 52 additions & 42 deletions .travis.yml
@@ -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

0 comments on commit 9e67b4f

Please sign in to comment.