forked from nautobot/nautobot-app-golden-config
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
63 lines (57 loc) · 1.51 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
---
stages:
- name: "lint"
- name: "test"
- name: "deploy-github"
if: "tag IS present"
# - name: "deploy-pypi"
# if: "tag IS present"
language: "python"
python:
- 3.6
- 3.7
- 3.8
services:
- "docker"
# --------------------------------------------------------------------------
# Tests
# --------------------------------------------------------------------------
before_install:
- 'docker login -u "$DOCKER_HUB_USERNAME" --password "$DOCKER_HUB_PASSWORD"' # yamllint disable-line rule:quoted-strings
before_script:
- "pip install invoke toml docker-compose poetry"
script:
- "invoke build --python-ver $TRAVIS_PYTHON_VERSION"
- "invoke unittest"
jobs:
include:
- stage: "lint"
before_script:
- "pip install invoke toml docker-compose"
- "invoke build"
script:
- "invoke black"
- "invoke bandit"
- "invoke pydocstyle"
- "invoke pylint"
- 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":
all_branches: true
# - stage: "deploy-pypi"
# before_script:
# - "pip install poetry"
# script:
# - "poetry version $TRAVIS_TAG"
# - "poetry config pypi-token.pypi $PYPI_TOKEN"
# - "poetry publish --build"