-
Notifications
You must be signed in to change notification settings - Fork 1.6k
172 lines (147 loc) · 4.91 KB
/
test_suite.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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Run Test Suite
on:
push:
branches:
- master
pull_request:
jobs:
# Uses Python Framework build because on macos matplotlib requires it
macos:
runs-on: macos-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@v3
- uses: s-weigand/setup-conda@v1
with:
activate-conda: true
- name: Install pythonw
run: conda install python.app
- name: Python Version Info
run: |
pythonw --version
which python
pythonw -m site --user-site
echo $PYTHONPATH
echo $PYTHONHOME
- name: Install dependencies
run: |
brew install imagemagick
# needed for installing matplotlib
brew install pkg-config
python -m pip install --upgrade wheel setuptools coveralls
python -m pip install ".[test, optional]"
- name: Test with pytest
run: |
pythonw -m pytest --doctest-glob "moviepy/**/**.py" -v --cov moviepy --cov-report term-missing
- name: Coveralls
run: coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_SERVICE_NAME: github
windows:
runs-on: windows-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Get ImageMagick installer from cache
id: imagemagick-installer-cache
uses: actions/cache@v3
with:
path: |
ImageMagick.exe
key: ${{ runner.os }}-latest
- name: Download ImageMagick installer
shell: cmd
if: steps.imagemagick-installer-cache.outputs.cache-hit != 'true'
run: |
python3 scripts/get-latest-imagemagick-win.py >im-url.txt
set /p IMAGEMAGICK_URL= <im-url.txt
rm im-url.txt
echo %IMAGEMAGICK_URL%
curl %IMAGEMAGICK_URL% -o ImageMagick.exe
- name: Install ImageMagick
id: imagemagick-install
shell: cmd
run: |
set IMAGEMAGICK_INSTALL_DIR=%CD%\imagemagick
mkdir %IMAGEMAGICK_INSTALL_DIR%
echo %IMAGEMAGICK_INSTALL_DIR%
ImageMagick.exe /SILENT /SP /DIR=%IMAGEMAGICK_INSTALL_DIR%
dir imagemagick
move imagemagick\ffmpeg.exe ffmpeg.exe
move imagemagick\magick.exe convert.exe
- name: Install Python dependencies
run: |
python -m pip install --upgrade wheel setuptools coveralls
python -m pip install ".[test]"
- name: Check third party dependencies
run: |
python moviepy\config.py
- name: PyTest
shell: cmd
run: |
python -m pytest --cov moviepy --cov-report term-missing
- name: Coveralls
run: coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_SERVICE_NAME: github
linux:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
fail-fast: false
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Python Version Info
run: |
python --version
which python
python -m site --user-site
- name: Install common requirements
run: |
python -m pip install --upgrade wheel setuptools
- name: Install test requirements
if: ${{ matrix.python-version == '3.7' }}
run: |
python -m pip install ".[test, doc]"
python -m pip install python-dotenv
- name: Install test and optional requirements
if: ${{ matrix.python-version != '3.7' }}
run: |
python -m pip install ".[test, optional, doc]"
- name: Configure ImageMagick policy
run: |
cat /etc/ImageMagick-6/policy.xml \
| sed 's/none/read,write/g' \
| sudo tee /etc/ImageMagick-6/policy.xml
- name: PyTest
run: |
python -m pytest --doctest-glob "moviepy/**/**.py" --cov moviepy --cov-report term-missing
- name: Test pip installation
run: |
pip install -e .
pip install -e .[optional]
pip install -e .[test]
pip install -e .[doc]
- name: Coveralls
run: coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_SERVICE_NAME: github