forked from networktocode/ntc-netbox-plugin-metrics-ext
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
40 lines (38 loc) · 1.17 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
---
language: python
python:
- '3.6'
- '3.7'
- '3.8'
env:
# Each version of NetBox listed here must have a corresponding directory/configuration file
# under development/netbox_<NETBOX_VER>/configuration.py
matrix:
- NETBOX_VER=v2.8.9
- NETBOX_VER=v2.9.11
- NETBOX_VER=v2.10.4
services:
- docker
# --------------------------------------------------------------------------
# Tests
# --------------------------------------------------------------------------
before_script:
- pip install invoke docker-compose
- curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py > /tmp/get-poetry.py
- python /tmp/get-poetry.py -y --version 1.0.2
- source $HOME/.poetry/env
script:
- invoke build --python-ver $TRAVIS_PYTHON_VERSION
- invoke tests --python-ver $TRAVIS_PYTHON_VERSION
# --------------------------------------------------------------------------
# Deploy
# --------------------------------------------------------------------------
deploy:
provider: script
script: poetry config pypi-token.pypi $PYPI_TOKEN && poetry publish --build
skip_cleanup: true
on:
tags: true
branch: master
condition: $NETBOX_VER = master
python: 3.7