-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
87 lines (56 loc) · 1.27 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# Organize the .travis.yml by the steps in the build lifecycle
# https://docs.travis-ci.com/user/customizing-the-build/#The-Build-Lifecycle
# 0. language and build environment
language: python
python: 3.7
dist: xenial
sudo: true
# 0.5 jobs, stages, and matrix
stages:
- lint
- docs
- test
jobs:
include:
# lint stage
- stage: lint
env: TOXENV=dodgy
- env: TOXENV=flake8
- env: TOXENV=manifest
- env: TOXENV=mypy
- env: TOXENV=pyroma # TODO move to deploy?
- env: TOXENV=radon
- env: TOXENV=vulture
- env: TOXENV=xenon
# docs stage
- stage: docs
env: TOXENV=doc8
- env: TOXENV=readme
- env: TOXENV=docs
# test stage
- stage: test
env: TOXENV=py
matrix:
allow_failures:
- env: TOXENV=doc8
- env: TOXENV=docs
- env: TOXENV=py
# 1. apt addons
# 2. cache components
cache: pip
# 3. before_install
# 4. install
install:
- sh -c 'if [ "$TOXENV" = "py" ]; then pip install tox codecov; else pip install tox; fi'
# 5. before_script
# 6. script
script:
- tox
# 7. before_cache
# 8. after_success/after_failure
after_success:
- sh -c 'if [ "$TOXENV" = "py" ]; then tox -e coverage-report; codecov; fi'
# 9. before_deploy
# 10. deploy
# 11. after_deploy
# 12. after_script