-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy path.travis.yml
80 lines (77 loc) · 2.23 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
---
sudo: true
language: python
dist: xenial
env:
global:
- GLTF_EXPERIMENTAL_SUPPORT_ENABLED=1
before_install:
- sudo rm -f /etc/ImageMagick-6/policy.xml
# main requirements
- sudo apt-get install -y poppler-utils qpdf libfile-mimeinfo-perl libimage-exiftool-perl ghostscript libsecret-1-0
# optionals
- sudo apt-get install libreoffice inkscape ufraw-batch ffmpeg xvfb
- DRAWIO_VERSION="12.6.5" && curl -LO https://github.com/jgraph/drawio-desktop/releases/download/v${DRAWIO_VERSION}/draw.io-amd64-${DRAWIO_VERSION}.deb && sudo dpkg -i draw.io-amd64-${DRAWIO_VERSION}.deb
install:
- pip install ".[all, testing]"
before_script:
- export DISPLAY=:99.0
- which Xvfb
- Xvfb :99 -screen 0 1x1x16 > /dev/null 2>&1 &
# command to run tests
script:
# FIXME - G.M - 2019-11-07 - Exclude stl file from tests as vtk raised "core dumped" error.
- cd ${TRAVIS_BUILD_DIR} && pytest tests -m "not slow"
# - "cd ${TRAVIS_BUILD_DIR} && mypy preview_generator --ignore-missing-imports --disallow-untyped-defs"
jobs:
include:
- stage: static-tests
name: fmt
python: "3.7"
before_install: skip
install: skip
before_script:
- pip install black isort
script:
- black --version
- echo -n "isort " && isort --version-number
- black -l 100 --exclude '/(\..*)/' --diff --check preview_generator tests setup.py
- isort --df -c **/*.py
- stage: static-tests
name: flake8
python: "3.7"
before_install: skip
install: skip
before_script:
- pip install flake8
script:
- flake8 --version
- flake8
- stage: static-tests
name: mypy
python: "3.7"
before_install: skip
install: skip
before_script:
- pip install mypy==0.770
script:
- mypy --version
- mypy --ignore-missing-imports --disallow-untyped-defs .
- stage: tests
python: "3.5"
- stage: tests
python: "3.6"
- stage: tests
python: "3.7"
- stage: tests
python: "3.8"
- stage: tests
python: "3.9"
- stage: slow-tests
python: "3.5"
script:
- cd ${TRAVIS_BUILD_DIR} && pytest tests -m "slow"
stages:
- static-tests
- tests
- slow-tests