Skip to content

Commit bdd3d8b

Browse files
committed
Revert "Removed tox and simplified test workflow."
This reverts commit cbc64e3.
1 parent c02423b commit bdd3d8b

File tree

4 files changed

+86
-61
lines changed

4 files changed

+86
-61
lines changed

.github/workflows/build.yml

Lines changed: 58 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,66 @@
11
name: Build
22

33
on:
4-
push:
5-
branches:
6-
- master
7-
pull_request:
8-
branches:
9-
- master
10-
11-
env:
12-
MAIN_PYTHON_VERSION: "3.12"
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
1310

1411
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]
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]
28+
29+
# Only test on a couple of versions on Windows.
30+
exclude:
31+
- os: windows-latest
32+
tox-env: pypy-test
2333

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]
3434

35-
- name: Run tests
36-
run: |
37-
pytest -v --cov=mediafile --cov=mediafile --cov-report=xml --cov-report=html test/
38-
- name: Upload coverage reports
39-
if: matrix.os == 'ubuntu-24.04' && matrix.python-version == env.MAIN_PYTHON_VERSION
40-
uses: actions/upload-artifact@v4
41-
with:
42-
name: coverage-${{ github.run_id }}
43-
path: htmlcov/
44-
retention-days: 30
35+
steps:
36+
- uses: actions/checkout@v3
37+
- name: Set up Python ${{ matrix.python }}
38+
uses: actions/setup-python@v4
39+
with:
40+
python-version: ${{ matrix.python }}
41+
- name: Install Tox
42+
run: pip install tox
43+
- name: Tox
44+
run: tox -e ${{ matrix.tox-env }}
4545

46-
style:
47-
name: Style
48-
runs-on: ubuntu-latest
49-
steps:
50-
- uses: actions/checkout@v5
51-
- name: Set up Python ${{ env.MAIN_PYTHON_VERSION }}
52-
uses: actions/setup-python@v5
53-
with:
54-
python-version: ${{ env.MAIN_PYTHON_VERSION }}
55-
- name: Install dependencies
56-
run: |
57-
python -m pip install --upgrade pip
58-
pip install .[dev]
59-
- name: Check style with Ruff
60-
run: |
61-
ruff check --output-format=github .
62-
- name: Check format with Ruff
63-
run: |
64-
ruff format --check .
46+
style:
47+
name: Style
48+
runs-on: ubuntu-latest
49+
steps:
50+
- uses: actions/checkout@v4
51+
- name: Install Python
52+
uses: actions/setup-python@v5
53+
with:
54+
python-version: "3.9"
55+
- name: Install dependencies
56+
run: |
57+
python -m pip install --upgrade pip
58+
pip install .[dev]
59+
- name: Check style with Ruff
60+
id: ruff
61+
run: |
62+
ruff check --output-format=github .
63+
- name: Check format with Ruff
64+
id: ruff-format
65+
run: |
66+
ruff format --check .

mediafile/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@
7272
)
7373
from .utils import Image, loadfile, mutagen_call, update_filething
7474

75-
__version__ = "1.0.0-rc1"
75+
__version__ = "1.0.0-a1"
7676
__all__ = [
7777
"UnreadableFileError",
7878
"FileTypeError",

pyproject.toml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,17 @@ classifiers = [
1717
'Topic :: Multimedia :: Sound/Audio',
1818
'License :: OSI Approved :: MIT License',
1919
'Environment :: Web Environment',
20+
'Programming Language :: Python :: 3.7',
21+
'Programming Language :: Python :: 3.8',
2022
'Programming Language :: Python :: 3.9',
2123
'Programming Language :: Python :: 3.10',
22-
'Programming Language :: Python :: 3.11',
23-
'Programming Language :: Python :: 3.12',
24-
'Programming Language :: Python :: 3.13',
2524
'Programming Language :: Python :: Implementation :: PyPy',
2625
]
2726

2827
[tool.flit.metadata.requires-extra]
28+
test = [
29+
"tox"
30+
]
2931
dev = [
3032
"ruff",
3133
"pytest",
@@ -34,7 +36,7 @@ dev = [
3436

3537
[tool.ruff]
3638
target-version = "py39"
37-
include = ["mediafile/**/*", "test/**/*.py"]
39+
include = ["mediafile.py", "test/**/*.py"]
3840

3941
[tool.ruff.lint]
4042
select = [

tox.ini

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Tox (http://tox.testrun.org/) is a tool for running tests
2+
# in multiple virtualenvs. This configuration file will run the
3+
# test suite on all supported python versions. To use it, "pip install tox"
4+
# and then run "tox" from this directory.
5+
6+
[tox]
7+
envlist = py310-test
8+
isolated_build = True
9+
10+
[tox:.package]
11+
basepython = python3
12+
13+
[_test]
14+
deps =
15+
pytest
16+
17+
[testenv]
18+
deps =
19+
{test,cov}: {[_test]deps}
20+
commands =
21+
py3{9,10,11,12,13}-test: python -bb -m pytest {posargs}

0 commit comments

Comments
 (0)