-
Notifications
You must be signed in to change notification settings - Fork 16
/
.travis.yml
63 lines (58 loc) · 1.28 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
# Config file for automatic testing at travis-ci.org
language: python
dist: "xenial"
python:
- 3.9
- 3.8
- 3.7
cache:
pip: true
directories:
- "$HOME/.cache/pre-commit"
stages:
- lint
- test
- docs
- name: deploy
if: tag IS present
before_install:
- pip install --upgrade pip
install:
- pip install poetry
- pip install tox-travis
script:
- tox
jobs:
include:
- stage: lint
python: 3.7
install:
- pip install pre-commit
- pre-commit install-hooks
script:
- pre-commit run --all-files
- stage: docs
python: 3.9
install:
- pip install poetry
- poetry install -v
script:
- echo $PWD
- sphinx-build -nWT -b dummy ./docs ./docs/_build
- stage: deploy
script:
- echo Deploying to PyPI...
before_deploy:
# User and password environment variables are set as hidden variables through
# the web interface in the project settings.
- pip install --upgrade pip
- pip install poetry
- poetry config http-basic.pypi $PYPI_USER $PYPI_PASS
- poetry build
deploy:
provider: script
script: poetry publish
skip_cleanup: true
on:
branch: master
tags: true