forked from jupyterhub/dockerspawner
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
77 lines (71 loc) · 1.98 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
language: python
env:
global:
- ASYNC_TEST_TIMEOUT=30
# request additional services for the jobs to access
services:
- docker
before_install:
- docker swarm init
- nvm install 10; nvm use 10
- npm install -g configurable-http-proxy
- pip install --upgrade setuptools pip
- pip install --upgrade -r dev-requirements.txt jupyterhub==${JUPYTERHUB:-0}.*
install:
- pip install -e .
- pip freeze
script:
- pyflakes dockerspawner
- |
# pre-pull images to avoid long wait times in tests
for v in 1.0 1.1; do
docker pull jupyterhub/singleuser:$v
# preserve the layers with a different tag
docker tag jupyterhub/singleuser:$v jupyterhub/singleuser:${v}-cache
# untag so that pull actions are still required
docker rmi jupyterhub/singleuser:$v
done
- |
# run tests
if [[ -z "$TEST" ]]; then
travis_retry py.test --cov dockerspawner tests -v
fi
- |
# run internal-ssl test with docker-compose
if [[ "$TEST" = "internal-ssl" ]]; then
cd examples/internal-ssl
pytest -vsx
fi
jobs:
fast_finish: true
include:
# Default stage: test
- name: internal-ssl test
python: 3.6
env: TEST=internal-ssl
- name: python:3.5 + jupyterhub 1.0
python: 3.5
env: JUPYTERHUB=1.0
- name: python:3.6 + jupyterhub 1.0
python: 3.6
env: JUPYTERHUB=1.0
- name: python:3.7 + jupyterhub 1.1.0
python: 3.7
env: JUPYTERHUB=1.1.0
- name: python:3.8 + jupyterhub 1.1.0
python: 3.8
env: JUPYTERHUB=1.1.0
# Only deploy if all test jobs passed
- stage: deploy
python: 3.7
if: tag IS present
deploy:
provider: pypi
user: __token__
# password: see secret PYPI_PASSWORD variable
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
fast_finish: true