forked from networktocode/ntc-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
68 lines (63 loc) · 1.57 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
---
stages:
- name: "lint"
- name: "test"
- name: "deploy-github"
if: "tag IS present"
- name: "deploy-pypi"
if: "tag IS present"
language: "python"
dist: "xenial"
os: "linux"
python:
- "3.6"
- "3.7"
- "3.8"
# --------------------------------------------------------------------------
# Tests
# --------------------------------------------------------------------------
before_script:
- "pip install --upgrade pip"
- "pip install poetry"
- "poetry install"
script:
- "poetry run tox -e py36,py37,py38"
jobs:
include:
- stage: "lint"
before_script:
- "pip install --upgrade pip"
- "pip install poetry"
- "poetry install"
script:
- "poetry run tox -e black"
- "poetry run tox -e flake8"
- "poetry run tox -e yamllint"
- stage: "deploy-github"
before_script:
- "pip install --upgrade pip"
- "pip install poetry"
script:
- "poetry version $TRAVIS_TAG"
- "poetry build"
deploy:
provider: "releases"
api_key: "$GITHUB_AUTH_TOKEN"
file_glob: true
file: "dist/*"
skip_cleanup: true
"on":
all_branches: true
- stage: "deploy-pypi"
before_script:
- "pip install --upgrade pip"
- "pip install poetry"
script:
- "echo Deploying the release to PyPI"
- "poetry version $TRAVIS_TAG"
deploy:
provider: "script"
skip_cleanup: true
script: "poetry publish --build -u __token__ -p $PYPI_TOKEN"
"on":
all_branches: true