forked from Zulko/moviepy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
59 lines (49 loc) · 2.26 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
dist: xenial
language: python
cache: pip
os: linux
python:
- 3.6
- 3.7
- 3.8
before_install:
- sudo apt-get -y -qq update
# Ensure PIP is up-to-date to avoid warnings.
- python -m pip install --upgrade pip
# Ensure setuptools is up-to-date to avoid environment_markers bug.
- pip install --upgrade setuptools
# The default pytest that is installed is too old on some platforms, leading to version conflicts
# pytest-cov contains plugin support for checking code coverage
- pip install --upgrade pytest-cov
- pip install flake8
# Modify ImageMagick policy file so that Textclips work correctly.
# `| sudo tee` replaces `>` so that it can have root permissions
- cat /etc/ImageMagick-6/policy.xml | sed 's/none/read,write/g' | sudo tee /etc/ImageMagick-6/policy.xml
install:
- pip install .[test]
before_script:
# Stop the build if there are Python syntax errors or undefined names
- flake8 . --count --select=E901,E999,F821,F822,F823,W605 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide.
# Some warning codes are ignored because they conflict with black's formatting, or are
# incompatible with MoviePy's structure
# E203: whitespace before ':'
# E302: expected 2 blank lines, found 0
# E402: module level import not at top of file
# W291: trailing whitespace
# W293: blank line contains whitespace
# W503: line break before binary operator
- flake8 moviepy --ignore=E203,E302,E402,W291,W293,W503 --max-complexity=10 --max-line-length=127 --statistics --count --exit-zero
# Check examples and tests with slightly relaxed rules to allow 'star' imports
# F403 'from moviepy.editor import *' used; unable to detect undefined names
# F405 'name' may be undefined, or defined from star imports: moviepy.editor
- flake8 . --ignore=E203,E302,E402,W291,W293,W503,F403,F405 --exclude moviepy/ --max-complexity=10 --max-line-length=127 --statistics --count --exit-zero
script:
- pytest tests/ --doctest-modules -v --cov moviepy --cov-report term-missing
# Now the *code* is tested, let's check that the setup is compatible with PIP without falling over.
- pip install -e .
- pip install -e .[optional]
- pip install -e .[test]
- pip install -e .[doc]
after_success:
- coveralls