Skip to content
This repository has been archived by the owner on Aug 17, 2023. It is now read-only.

Commit

Permalink
Test PyPI pre-releases but allow for failures (#423)
Browse files Browse the repository at this point in the history
Using `python setup.py install` will install PyPI pre-releases of
packages while `pip install -r requirements.txt` won't do that. This
lead to CI tests failing as reported in #421. This commit updates the CI
build setup to run two parallell tests, one where we don't use
pre-releases and one where we do but allow them to fail and won't wait
on the run to complete either.

ref: jupyterhub/kubespawner#370 (comment)
Fixes #421
  • Loading branch information
consideRatio authored and k8s-ci-robot committed Nov 21, 2019
1 parent 9b0d4ed commit fd86fc7
Showing 1 changed file with 20 additions and 7 deletions.
27 changes: 20 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,26 @@
dist: xenial # required for Python >= 3.7
language: python
# Python versions to test
python:
- "3.7"

# Command to install dependencies
install:
- python setup.py install
- pip install --upgrade pytest
# NOTE: We install requirements explicitly with pip to avoid
# always installing packaged pre-releases as happens when we
# use setup.py to install our packages.
- pip install -r requirements.txt ${PIP_PRE_RELEASES:+--pre}
- python setup.py install
- pip install --upgrade pytest
- pip freeze
# Command to run tests
script:
- cd tests/unit
- pytest
- cd tests/unit
- pytest --verbose

matrix:
include:
- python: 3.7
env: []
- python: 3.7
env: &allowed_failure_1 [PIP_PRE_RELEASES=True]
allow_failures:
- env: *allowed_failure_1
fast_finish: true

0 comments on commit fd86fc7

Please sign in to comment.