-
-
Notifications
You must be signed in to change notification settings - Fork 287
61 lines (59 loc) · 1.89 KB
/
cpython_tests.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
name: CPython Test Suite
on:
workflow_call:
jobs:
cpython:
name: "${{ matrix.os }} / CPython ${{ matrix.pyversion }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: ["ubuntu-latest", "macos-latest", "windows-latest"]
pyversion: ["3.8", "3.9", "3.10", "3.11", "3.12"]
include:
- name: Linux py310 full
os: ubuntu-latest
pyversion: '3.10'
TEST_UNIT: 1
TEST_FULL: 1
- name: Use PyAV 10.0.0
pyversion: '3.11'
PYAV_10_0_0: 1
exclude:
# exclude 3.11 on windows until we can replicate the
# access violation found in CI
- os: windows-latest
pyversion: '3.11'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Set up Python ${{ matrix.pyversion }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.pyversion }}
- name: Install dependencies for tests
shell: bash
run: |
pip install .[test,all-plugins]
- name: Install OpenCV on non-MacOS
if: matrix.os != 'macos-latest'
run: |
pip install opencv-python
- name: Install optional dependencies for tests
if: matrix.TEST_FULL == 1
run: |
pip install -q --upgrade simpleitk astropy
- name: Downgrade PyAV
# PyAV 10.0.0 is needed on py3.11 but has issues, so we only use it on
# py3.11 for now
if: matrix.PYAV_10_0_0 != 1
run: |
pip install --upgrade av!=10.0.0
- name: Run All Unit tests
run: |
coverage run -m pytest -v --github-username "anything" --github-token ${{ secrets.GITHUB_TOKEN }}
- name: Upload coverage to Codecov
run: |
curl -s https://codecov.io/bash | bash
shell: bash