forked from albumentations-team/albumentations
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
49 lines (43 loc) · 1.75 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
language: python
notifications:
email:
on_success: never
cache:
directories:
- $HOME/.cache/pip
env:
global:
- IMGAUG_NO_CV2_INSTALLED_CHECK=TRUE
- TEST_MODE=DEFAULT
matrix:
include:
- python: 2.7
env: PYTORCH_WHEEL=https://download.pytorch.org/whl/cpu/torch-1.0.1.post2-cp27-cp27mu-linux_x86_64.whl
- python: 3.5
env: PYTORCH_WHEEL=https://download.pytorch.org/whl/cpu/torch-1.0.1.post2-cp35-cp35m-linux_x86_64.whl
- python: 3.6
env: PYTORCH_WHEEL=https://download.pytorch.org/whl/cpu/torch-1.0.1.post2-cp36-cp36m-linux_x86_64.whl
- python: 3.7
env: PYTORCH_WHEEL=https://download.pytorch.org/whl/cpu/torch-1.0.1.post2-cp37-cp37m-linux_x86_64.whl
dist: xenial
sudo: true
- python: 3.7
env: TEST_MODE=DOCS
- python: 3.7
env: TEST_MODE=BLACK
- python: 3.7
env: TEST_MODE=SPHINX
install:
- pip install --upgrade pip pytest
- if [[ "$TEST_MODE" == "DOCS" ]]; then pip install .; fi
- if [[ "$TEST_MODE" == "BLACK" ]]; then pip install black; fi
- if [[ "$TEST_MODE" == "SPHINX" ]]; then pip install -r docs/requirements.txt; fi
- if [[ -n "$PYTORCH_WHEEL" ]]; then pip install "$PYTORCH_WHEEL" torchvision; fi
- if [[ "$TEST_MODE" == "DEFAULT" ]] || [[ "$TEST_MODE" == "SPHINX" ]]; then pip install .[tests]; fi
- if [[ "$TEST_MODE" == "DEFAULT" ]]; then pip install "pydocstyle<4.0.0" flake8 flake8-docstrings; fi
script:
- if [[ "$TEST_MODE" == "DOCS" ]]; then python tools/make_transforms_docs.py check README.md; fi
- if [[ "$TEST_MODE" == "BLACK" ]]; then black --check .; fi
- if [[ "$TEST_MODE" == "SPHINX" ]]; then sphinx-build -b html docs /tmp/_docs_build; fi
- if [[ "$TEST_MODE" == "DEFAULT" ]]; then pytest; fi
- if [[ "$TEST_MODE" == "DEFAULT" ]]; then flake8; fi