forked from jupyterhub/kubespawner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
93 lines (83 loc) · 2.83 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
language: python
sudo: required
dist: bionic
# install dependencies
install:
- pip install --upgrade setuptools pip
# Only add the --pre flag if $PRE_RELEASES is specified to test pre-releases
# of dependencies, and only pin kubernetes if $KUBE_PY is specified.
- pip install -e ".[test]" ${PRE_RELEASES:+--pre} ${KUBE_PY:+kubernetes==${KUBE_PY}}
- pip freeze
# run tests
script:
# flake8 runs a very quick code analysis
# without running any of the code it analyses
- flake8 kubespawner
# install kubectl, minikube and start minikube
- source ci/minikube.env
- ./ci/install-kube.sh
- pytest --cov kubespawner -v
# followup
after_success:
- pip install codecov
- codecov
matrix:
# NOTE: We may end up updating these set versions with time, when doing that,
# these links are relevant.
#
# ref: KUBE_VERSION's valid values
# https://github.com/kubernetes/kubernetes/tags
# ref: KUBE_PY's valid values
# https://github.com/kubernetes-client/python#compatibility
include:
# Test the oldest supported python on
# the latest supported kubernetes-client,
# and use the latest supported kubernetes
# version along for the kubernetes-client.
- python: 3.8
env: KUBE_PY=8 KUBE_VERSION=1.12.10
- python: 3.7
env: KUBE_PY=9 KUBE_VERSION=1.13.12
- python: 3.6
env: &latest_supported KUBE_PY=10 KUBE_VERSION=1.14.9
# Allowed failure tests:
# ----------------------
# 1. Test with pre-releases of kubernetes-client/python and other
# python dependencies
- &allowed_failure_1
python: 3.8
env: PRE_RELEASES=TRUE KUBE_VERSION=1.15.3
# 2. Test with latest stable kubernetes client along with the latest
# kubernetes cluster version
- &allowed_failure_2
python: 3.8
env: KUBE_PY=10 KUBE_VERSION=1.16.3
# 3. Test with a nightly python build using latest known
# supported configuration.
- &allowed_failure_3
python: nightly
env: *latest_supported
# Only deploy if all test jobs passed
- stage: deploy
if: tag IS present
python: 3.7
# FIXME: We don't want to run tests again here, but I got
# the following issue when these were commented out...
# https://travis-ci.org/mapbox/vtvalidate/jobs/492280599
#script: []
#after_success: []
deploy:
provider: pypi
user: __token__
# password: set by TravisCI's environment variable PYPI_PASSWORD
# ref: https://travis-ci.org/jupyterhub/kubespawner/settings
distributions: sdist bdist_wheel
on:
# Without this we get the note about:
# Skipping a deployment with the pypi provider because this branch is not permitted: <tag>
tags: true
allow_failures:
- *allowed_failure_1
- *allowed_failure_2
- *allowed_failure_3
fast_finish: true