@@ -2,47 +2,62 @@ name: Tests
22
33on :
44 push :
5- branches : [main]
5+ branches : [main, develop ]
66 pull_request :
7- branches : [main]
7+ branches : [main, develop ]
88
99jobs :
1010 test :
11- name : Python ${{ matrix.python-version }} on ${{ matrix.os }}
12- runs-on : ${{ matrix.os }}
11+ name : Test Python ${{ matrix.python-version }}
12+ runs-on : ubuntu-latest
1313 strategy :
14- fail-fast : false
1514 matrix :
16- os : [ubuntu-latest, macos-latest, windows-latest]
17- python-version : ["3.11", "3.12", "3.13", "3.14"]
15+ python-version : ["3.8", "3.9", "3.10", "3.11", "3.12"]
1816
1917 steps :
2018 - uses : actions/checkout@v4
2119
22- - name : Install uv
23- uses : astral-sh/setup-uv@v5
24- with :
25- enable-cache : true
26-
2720 - name : Set up Python ${{ matrix.python-version }}
2821 uses : actions/setup-python@v5
2922 with :
3023 python-version : ${{ matrix.python-version }}
3124
3225 - name : Install dependencies
33- run : uv sync
26+ run : |
27+ python -m pip install --upgrade pip
28+ pip install -e .
29+ pip install pytest pytest-cov
3430
3531 - name : Run tests
36- run : uv run pytest tests/ -v
37-
38- - name : Run tests with coverage
39- if : matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
40- run : |
41- uv run pytest tests/ --cov=src/toon_format --cov-report=xml --cov-report=term-missing
32+ run : pytest --cov=toon_format --cov-report=xml --cov-report=term
4233
43- - name : Upload coverage to Codecov
44- if : matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
34+ - name : Upload coverage
4535 uses : codecov/codecov-action@v4
36+ if : matrix.python-version == '3.12'
4637 with :
4738 file : ./coverage.xml
4839 fail_ci_if_error : false
40+
41+ lint :
42+ name : Lint
43+ runs-on : ubuntu-latest
44+
45+ steps :
46+ - uses : actions/checkout@v4
47+
48+ - name : Set up Python
49+ uses : actions/setup-python@v5
50+ with :
51+ python-version : " 3.12"
52+
53+ - name : Install dependencies
54+ run : |
55+ python -m pip install --upgrade pip
56+ pip install ruff mypy
57+
58+ - name : Run ruff
59+ run : ruff check src/toon_format tests
60+
61+ - name : Run mypy
62+ run : mypy src/toon_format
63+ continue-on-error : true # Mypy is informational only
0 commit comments