-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
63 lines (53 loc) · 1.15 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
language: python
stages:
- lint
- test
- name: test_latest_release
if: type = cron
- name: pip_package
if: tag =~ ^v(\d)(\d|\.)*
jobs:
include:
- &default
stage: test
python: 3.7
env: TOX_ENV=py37
install:
- pip install tox
script:
- tox -e $TOX_ENV
- <<: *default
stage: lint
env: TOX_ENV=flake8
- <<: *default
python: 3.6
env: TOX_ENV=py36
- <<: *default
python: 3.8
env: TOX_ENV=py38
- <<: *default
# like a python-using developer
env: TOX_ENV=dev
- <<: *default
# measuring coverage of a pytest plugin using pytest-cov is slightly awkward,
# so we have a separate step for it
env: TOX_ENV=coverage
- <<: *default
stage: pip_package
install: true
script: true
deploy:
provider: pypi
distributions: "sdist bdist_wheel"
on:
tags: true
user: ceball
password: $PYPI_PWD
# TODO: don't need to clone the repo
- stage: test_latest_release
python: 3.7
install:
- tmp_dir=$(mktemp -d)
- cd $tmp_dir && pip install nbsmoke
script:
- cd $tmp_dir && pytest -v --pyargs nbsmoke