forked from networktocode/circuit-maintenance-parser
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
71 lines (65 loc) · 1.5 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
---
# Add additional stages in the order of execution here, and then under the job:include: key
stages:
- "lint"
- "test"
- name: "deploy-github"
if: "tag IS present"
- name: "deploy-pypi"
if: "tag IS present"
language: "python"
python:
- 3.6
- 3.7
- 3.8
- 3.9
# Script & Before Script for test stage
before_script:
- "pip install invoke poetry toml"
- "poetry install"
script:
- "invoke pytest --local"
jobs:
include:
- stage: "lint"
env:
- "INVOKE_LOCAL=True"
before_script:
- "pip install invoke poetry toml"
- "poetry install --no-interaction --no-ansi --no-root"
script:
- "invoke black"
- "invoke bandit"
- "invoke pydocstyle"
- "invoke mypy"
- "invoke flake8"
- "invoke yamllint"
- "invoke pylint"
python: 3.7
- stage: "deploy-github"
before_script:
- "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":
tags: true
- stage: "deploy-pypi"
before_script:
- "pip install poetry"
script:
- "poetry version $TRAVIS_TAG"
- "poetry build"
deploy:
provider: "pypi"
username: "__token__"
password: "$PYPI_TOKEN"
skip_cleanup: true
"on":
tags: true