-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy path.travis.yml
129 lines (116 loc) · 4.32 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
language: python
cache: pip
dist: xenial
os:
- linux
python:
- &mainstream_python 3.7
- 3.7-dev
env:
global:
- PIPENV_IGNORE_VIRTUALENVS=1
install:
- &install_deps make install-deps
- .venv/bin/pip install codecov
before_script:
- &activate_venv source .venv/bin/activate
script:
- make cov
after_success:
- .venv/bin/codecov
_helpers:
- &_mainstream_python_base
python: *mainstream_python
- &_reset_steps
env: []
before_install: skip
install: skip
before_script: skip
script: skip
after_success: []
before_deploy: skip
- &_lint_base
stage: &pre_test_stage_name Linting and pre-test checks
<<: *_mainstream_python_base
<<: *_reset_steps
install:
- *install_deps
before_script:
- *activate_venv
- &_deploy_base
stage: &deploy_stage_name Deploy
<<: *_mainstream_python_base
<<: *_reset_steps
jobs:
include:
- <<: *_lint_base
name: Linting source code with isort
script:
- make check_isort
- <<: *_lint_base
name: Linting source code with black
script:
- make check_black
- <<: *_lint_base
name: Linting source code with flake8
script:
- make flake
- <<: *_lint_base
name: Linting source code with mypy
script:
- make mypy
- <<: *_deploy_base
name: PyPI deployment
if: ((tag =~ ^v) AND (branch = master)) OR ((tag =~ ^v) AND (tag = branch)) OR (env(DEPLOY_PYPI_DEBUG) = true)
deploy:
provider: pypi
user: linw
password:
secure: P1d9lTHCsJvF9htpiZINLD343TwhXQkUor3xAQJq06l/2AeQtjfZCDGHYkd+ahQfPTLs//L9uYeISaNQNi7MgmI3jq48g6YH702OrG8TrzD0a/lIaqmwVLtqkEmpTl96EBtslmtQAPJ4h/LOIk/2Hf2U/xdsWzVBkOIuXu6jmaht+GuGRH/GWvGmJMt82euLsgiUN+xhBCHVOr2vLJPw28Jsm6fsMyMzMLsQ9fnuysaGwi+QRwZxruBfmKkXLWEx3OkRz9XGVzkbtLqQabmq0QmB7cqCb1er/f5Q0hCKPqupm0p3wDPMguf/vqReZQ8Dkx5xiNG3rKKu+E4JbOxDqQhhcim5M15IIniQfVMqFl0LpKFPiI7pekeIZ2rtvUUtfcUCfTOjREc069k13fgiTsDACQsse/1sQm3PZlu21NAoaIwhw4D07x/Ar1vSwdGeZ6rHBmZzYyu8Fbo5e8xljtqV4T206Nu/9rpE0iEvzURc0bAftOCaccIO0PJON1HXFH14r2i8AJTGeWbnixbvBL4Xmok7lPRUKSAXN92EqXag0WCi0HKrMajqusH3FI2j7S+iQvWi9ad+GtjP11Qku8H/DfwyAggdtkilsFgxaeTdQIQRaM5RzPTu4GyOtT/RNKUhxmfikBTS4m1GJkB/ige9LG/32NhvCV5jSo2EP5U=
distributions: "sdist bdist_wheel"
skip_existing: true
on:
all_branches: true
- <<: *_deploy_base
name: Github Release deployment
if: ((tag =~ ^v) AND (branch = master)) OR ((tag =~ ^v) AND (tag = branch)) OR (env(DEPLOY_GH_RELEASE_DEBUG) = true)
install:
- *install_deps
before_script:
- *activate_venv
script:
- make build
before_deploy:
- *activate_venv
deploy:
provider: releases
api_key:
secure: MukueyqjKPF2XytNn1CyjZLHniNNo4/4hWgcoVQY02WnJa4uhrohJYsjI2ghQNC6yns40VqMrp6k8oWaNOkWxWcr7BV4AiX1RTO9Gpe4QoztFhdqecgxjEwYA+yAZT/TVy4Zuz+wI/rwOQcMtoAwnaU0ll2/+FJ6RHAV2pgHjV3gfUtjs6u9MQnx64p3XmUANjqDFGj0uGwK+nUc0Fbrd1uhaFit32cpjXtiBWm5cjgaKuT/pcLyd+Ike9f8ahwpYemir+E6YojjTRz+MxxZGIUXn+qj909Pj3T7ejTOaMnd9cDv7I4HhUcxxHDxvD0mv+2RvUR44HCBPLlGv7JA/9fQFrnC1Acan9UIvH6Vakz4J+onfivwcF0k1gpUXccP+Yh4xuAKtDre5xDkdZtvuU9UGzsvDQG09QWlo8bYkN4XdUcC4IFkyg9NtSfafsx8ERAnzQoKi3/k8N0ZRHc838DJWAYw2cQ3+PYPEfogs9a/7eiX9B5FsudtspGHU6Kp/5V1nanAWWzi6FZlpjEplBqcWjtOvxnv2VhqlXAiKmP+8XTYbIDNeXg5yvX9bKO1KSjXT/RUEedzXu1hMZUzd0/VjAsrmT8J5Mp3/BjEV9XioYLZt0UKYNl3SczioXKehhp6DvQ56MtWyBfwxOhXJIfUvDuaQCxXw8nuLm74uuE=
file_glob: true
file: dist/*
skip_cleanup: true
on:
all_branches: true
- <<: *_deploy_base
name: Github Pages deployment
if: ((tag =~ ^v) AND (branch = master)) OR ((tag =~ ^v) AND (tag = branch)) OR (env(DEPLOY_GH_PAGES_DEBUG) = true)
install:
- *install_deps
- .venv/bin/pip install -e .
before_script:
- *activate_venv
script:
- cd docs && make html
deploy:
provider: pages
skip_cleanup: true
github_token: $GITHUB_TOKEN # Set in the settings page of your repository, as a secure variable
keep_history: true
local_dir: docs/build/html
on:
all_branches: true
stages:
- *pre_test_stage_name
- test
- name: *deploy_stage_name
if: ((tag =~ ^v) AND (branch = master)) OR ((tag =~ ^v) AND (tag = branch)) OR (env(DEPLOY_DEBUG) = true)