forked from nautobot/nautobot-app-device-onboarding
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
66 lines (60 loc) · 1.48 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
---
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
env:
matrix:
- "NAUTOBOT_VER=1.0.0"
services:
- "docker"
# --------------------------------------------------------------------------
# Tests
# --------------------------------------------------------------------------
before_script:
- "pip install invoke toml docker-compose poetry"
script:
- "invoke build --nocache --python-ver $TRAVIS_PYTHON_VERSION"
- "invoke unittest"
jobs:
include:
- stage: "lint"
before_script:
- "pip install invoke toml"
- "invoke build --nocache"
script:
- "invoke black"
- "invoke bandit"
- "invoke pydocstyle"
- "invoke flake8"
- "invoke yamllint"
# - "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: # yamllint disable-line rule:truthy
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"