Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweak Travis CI Configuration #360

Merged
merged 17 commits into from
Dec 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 24 additions & 81 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,93 +1,36 @@
dist: xenial
sudo: false
language: python
python:
- '2.7'
- '3.6'
- '3.7'
env:
- HVAC_VAULT_VERSION=0.9.6
- HVAC_VAULT_VERSION=0.10.4
- HVAC_VAULT_VERSION=0.11.0 # This ver kept explicitly; it has subsequently reverted backwards-incompatible changes.
- HVAC_VAULT_VERSION=0.11.6
- HVAC_VAULT_VERSION=1.0.1
- HVAC_VAULT_VERSION=HEAD
matrix:
include:
- name: 'Python v2.7, Vault v0.9.6 - Integration/Unit Tests'
# Explicitly include our flake8 tox jobs so they're only run once per Python version and have independent results.
- name: 'Linting (flake8) - Python v2.7'
python: '2.7'
env:
- TOXENV=py27
- HVAC_VAULT_VERSION=0.9.6
- name: 'Python v2.7, Vault v0.10.4 - Integration/Unit Tests'
python: '2.7'
env:
- TOXENV=py27
- HVAC_VAULT_VERSION=0.10.4
# Leaving Vault v0.11.0 since it has some backwards-incompatible changes that were reverted in later versions.
- name: 'Python v2.7, Vault v0.11.0 - Integration/Unit Tests'
python: '2.7'
env:
- TOXENV=py27
- HVAC_VAULT_VERSION=0.11.0
- name: 'Python v2.7, Vault v0.11.5 - Integration/Unit Tests'
python: '2.7'
env:
- TOXENV=py27
- HVAC_VAULT_VERSION=0.11.5
- name: 'Python v2.7, Vault v1.0.0 - Integration/Unit Tests'
python: '2.7'
env:
- TOXENV=py27
- HVAC_VAULT_VERSION=1.0.0
- name: 'Python v2.7, Vault HEAD ref - Integration/Unit Tests'
python: '2.7'
env:
- TOXENV=py27
- HVAC_VAULT_VERSION=HEAD
- name: 'Python v2.7 - Linting (flake8)'
python: '2.7'
env:
- TOXENV=py27-flake8
- name: 'Python v3.6, Vault v0.9.6 - Integration/Unit Tests'
python: '3.6'
env:
- TOXENV=py36
- HVAC_VAULT_VERSION=0.9.6
- name: 'Python v3.6, Vault v0.10.4 - Integration/Unit Tests'
env: TOXENV=flake8-py27
- name: 'Linting (flake8) - Python v3.6'
python: '3.6'
env:
- TOXENV=py36
- HVAC_VAULT_VERSION=0.10.4
# Leaving Vault v0.11.0 since it has some backwards-incompatible changes that were reverted in later versions.
- name: 'Python v3.6, Vault v0.11.0 - Integration/Unit Tests'
python: '3.6'
env:
- TOXENV=py36
- HVAC_VAULT_VERSION=0.11.0
- name: 'Python v3.6, Vault v0.11.5 - Integration/Unit Tests'
python: '3.6'
env:
- TOXENV=py36
- HVAC_VAULT_VERSION=0.11.5
- name: 'Python v3.6, Vault v1.0.0 - Integration/Unit Tests'
python: '3.6'
env:
- TOXENV=py36
- HVAC_VAULT_VERSION=1.0.0
- name: 'Python v3.6, Vault HEAD ref - Integration/Unit Tests'
python: '3.6'
env:
- TOXENV=py36
- HVAC_VAULT_VERSION=HEAD
- name: 'Python v3.6 - Linting (flake8)'
python: '3.6'
env:
- TOXENV=py27-flake8
env: TOXENV=flake8-py36
- name: 'Linting (flake8) - Python v3.7'
python: '3.7'
env: TOXENV=flake8-py37
allow_failures:
- name: 'Python v2.7, Vault HEAD ref - Integration/Unit Tests'
python: '2.7'
env:
- TOXENV=py27
- HVAC_VAULT_VERSION=HEAD
- name: 'Python v3.6, Vault HEAD ref - Integration/Unit Tests'
python: '3.6'
env:
- TOXENV=py36
- HVAC_VAULT_VERSION=HEAD
# Ignore failed tests run against Vault builds using the HEAD ref at: https://github.com/hashicorp/vault.
- env: HVAC_VAULT_VERSION=HEAD
# Don't wait on the "allow_failures" build jobs before reporting on the overall success/failure of the current build.
fast_finish: true
install:
- tests/scripts/install-consul.sh
- tests/scripts/install-vault.sh ${HVAC_VAULT_VERSION}
- pip install tox
- pip install tox-travis
script:
- export PATH=$HOME/bin:$PATH
- make test
11 changes: 8 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = py27, py36, {py27,py36}-flake8
envlist = py27, py36, py37, flake8-py{27,36,37}

[flake8]
max-line-length = 160
Expand All @@ -12,12 +12,17 @@ deps = -rrequirements.txt
-rrequirements-dev.txt
passenv = CI TRAVIS TRAVIS_* HVAC_*

[testenv:py27-flake8]
[testenv:flake8-py27]
basepython = python2.7
deps = flake8
commands = flake8 {posargs}

[testenv:py36-flake8]
[testenv:flake8-py36]
basepython = python3.6
deps = flake8
commands = flake8 {posargs}

[testenv:flake8-py37]
basepython = python3.7
deps = flake8
commands = flake8 {posargs}