File: cpython_tests.yml

package info (click to toggle)
python-imageio 2.37.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,684 kB
  • sloc: python: 26,302; makefile: 138
file content (61 lines) | stat: -rw-r--r-- 1,926 bytes parent folder | download
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.10", "3.11", "3.12", "3.13"]
        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@v4
        with:
          fetch-depth: 2
      - name: Set up Python ${{ matrix.pyversion }}
        uses: actions/setup-python@v5
        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