This repository was archived by the owner on Jun 26, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.travis.yml
More file actions
77 lines (69 loc) · 1.95 KB
/
.travis.yml
File metadata and controls
77 lines (69 loc) · 1.95 KB
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
language: python
matrix:
include:
# basic tests withut a backend
- name: "Unittests Python 3.5"
python: 3.5
dist: xenial
env:
- TEST_TYPE="unittests"
- BACKEND="None"
- name: "Unittests Python 3.6"
python: 3.6
dist: xenial
env:
- TEST_TYPE="unittests"
- BACKEND="None"
- name: "Unittests Python 3.7"
python: 3.7
dist: xenial
env:
- TEST_TYPE="unittests"
- BACKEND="None"
# STATIC CHECKS
- name: "Static Style Checks"
python: 3.7
dist: xenial
env:
- TEST_TYPE="style-check"
- name: "Documentation"
python: 3.7
dist: xenial
env:
- TEST_TYPE="docs"
# command to install dependencies
before_install:
- if [[ "$TEST_TYPE" == "unittests" ]]; then
bash scripts/ci/install_before_tests.sh;
elif [[ "$TEST_TYPE" == "docs" ]]; then
bash scripts/ci/install_before_docs.sh;
else
bash scripts/ci/install_before_style_check.sh;
pip install -r docs/requirements.txt;
fi
install:
- pip install --no-deps .
# command to run tests
script:
# run tests or stylechecks
- if [[ "$TEST_TYPE" == "unittests" ]]; then
bash scripts/ci/run_tests.sh;
elif [[ "$TEST_TYPE" == "docs" ]]; then
bash scripts/ci/build_docs.sh;
else
bash scripts/ci/run_style_checks.sh;
fi
after_success:
- if [[ "$TEST_TYPE" == "unittests" ]]; then
codecov;
before_deploy:
- cd $TRAVIS_BUILD_DIR
deploy:
- provider: pypi
user: $PYPI_USERNAME
password: $PYPI_PASSWORD
on:
tags: true
distributions: "sdist bdist_wheel"
skip_existing: true
condition: $TEST_TYPE = style-check