|
1 | 1 | name: Build |
2 | 2 |
|
3 | 3 | on: |
4 | | - push: |
5 | | - branches: |
6 | | - - master |
7 | | - pull_request: |
8 | | - branches: |
9 | | - - master |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + pull_request: |
| 8 | + branches: |
| 9 | + - master |
10 | 10 |
|
11 | | -jobs: |
12 | | - test: |
13 | | - name: "${{ matrix.os }}: ${{ matrix.tox-env }}" |
14 | | - runs-on: ${{ matrix.os }} |
15 | | - strategy: |
16 | | - fail-fast: false |
17 | | - matrix: |
18 | | - tox-env: |
19 | | - [ |
20 | | - py39-test, |
21 | | - py310-test, |
22 | | - py311-test, |
23 | | - py312-test, |
24 | | - py313-test, |
25 | | - pypy-test, |
26 | | - ] |
27 | | - os: [ubuntu-24.04, windows-latest] |
| 11 | +env: |
| 12 | + MAIN_PYTHON_VERSION: "3.12" |
28 | 13 |
|
29 | | - # Only test on a couple of versions on Windows. |
30 | | - exclude: |
31 | | - - os: windows-latest |
32 | | - tox-env: pypy-test |
| 14 | +jobs: |
| 15 | + test: |
| 16 | + name: "${{ matrix.os }}: ${{ matrix.python-version }}" |
| 17 | + runs-on: ${{ matrix.os }} |
| 18 | + strategy: |
| 19 | + fail-fast: false |
| 20 | + matrix: |
| 21 | + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"] |
| 22 | + os: [ubuntu-24.04, windows-latest] |
33 | 23 |
|
34 | | - # Python interpreter versions. :/ |
35 | | - include: |
36 | | - - tox-env: py39-test |
37 | | - python: "3.9" |
38 | | - - tox-env: py310-test |
39 | | - python: "3.10" |
40 | | - - tox-env: py311-test |
41 | | - python: "3.11" |
42 | | - - tox-env: py312-test |
43 | | - python: "3.12" |
44 | | - - tox-env: py313-test |
45 | | - python: "3.13" |
46 | | - - tox-env: pypy-test |
47 | | - python: pypy3.9 |
| 24 | + steps: |
| 25 | + - uses: actions/checkout@v5 |
| 26 | + - name: Set up Python ${{ matrix.python-version }} |
| 27 | + uses: actions/setup-python@v5 |
| 28 | + with: |
| 29 | + python-version: ${{ matrix.python-version }} |
| 30 | + - name: Install dependencies |
| 31 | + run: | |
| 32 | + python -m pip install --upgrade pip |
| 33 | + pip install .[dev] |
48 | 34 |
|
49 | | - steps: |
50 | | - - uses: actions/checkout@v3 |
51 | | - - name: Set up Python ${{ matrix.python }} |
52 | | - uses: actions/setup-python@v4 |
53 | | - with: |
54 | | - python-version: ${{ matrix.python }} |
55 | | - - name: Install Tox |
56 | | - run: pip install tox |
57 | | - - name: Tox |
58 | | - run: tox -e ${{ matrix.tox-env }} |
| 35 | + - name: Run tests |
| 36 | + run: | |
| 37 | + pytest -v --cov=mediafile --cov-report=xml tests/ |
59 | 38 |
|
60 | | - style: |
61 | | - name: Style |
62 | | - runs-on: ubuntu-latest |
63 | | - steps: |
64 | | - - uses: actions/checkout@v4 |
65 | | - - name: Install Python |
66 | | - uses: actions/setup-python@v5 |
67 | | - with: |
68 | | - python-version: "3.9" |
69 | | - - name: Install dependencies |
70 | | - run: | |
71 | | - python -m pip install --upgrade pip |
72 | | - pip install .[dev] |
73 | | - - name: Check style with Ruff |
74 | | - id: ruff |
75 | | - run: | |
76 | | - ruff check --output-format=github . |
77 | | - - name: Check format with Ruff |
78 | | - id: ruff-format |
79 | | - run: | |
80 | | - ruff format --check . |
| 39 | + style: |
| 40 | + name: Style |
| 41 | + runs-on: ubuntu-latest |
| 42 | + steps: |
| 43 | + - uses: actions/checkout@v5 |
| 44 | + - name: Set up Python ${{ env.MAIN_PYTHON_VERSION }} |
| 45 | + uses: actions/setup-python@v5 |
| 46 | + with: |
| 47 | + python-version: ${{ env.MAIN_PYTHON_VERSION }} |
| 48 | + - name: Install dependencies |
| 49 | + run: | |
| 50 | + python -m pip install --upgrade pip |
| 51 | + pip install .[dev] |
| 52 | + - name: Check style with Ruff |
| 53 | + run: | |
| 54 | + ruff check --output-format=github . |
| 55 | + - name: Check format with Ruff |
| 56 | + run: | |
| 57 | + ruff format --check . |
0 commit comments