-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
47 lines (39 loc) · 988 Bytes
/
.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
dist: xenial
language: python
python: 3.7
install:
- pip install -r requirements.txt
- pip install pylint flake8 pytype pytest invoke twine
stages:
- lint
- test
- build docs
- name: build
if: (branch != master && tag IS blank) || type != push
- name: deploy
if: (branch = master || tag IS present) && type = push
jobs:
include:
- stage: lint
script:
- invoke lint
- stage: test
script:
- invoke test
- stage: build docs
script:
- invoke build-docs
- stage: build
script:
- invoke build
- stage: deploy
script:
- |
if [ ! -z "$TRAVIS_TAG" ]; then
export IMAGE_TAG=$TRAVIS_TAG
else
export IMAGE_TAG='latest'
fi
- invoke build --docker-tag=$IMAGE_TAG
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- invoke publish --docker-tag=$IMAGE_TAG --production-pypi