1- # This workflow will install Python dependencies, run tests and lint with a single version of Python
2- # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
31name : Test pySEQTarget
42
53on :
@@ -17,35 +15,30 @@ jobs:
1715 strategy :
1816 matrix :
1917 python-version : ["3.11", "3.12", "3.13", "3.14"]
20-
18+
2119 steps :
2220 - uses : actions/checkout@v6
23-
21+
22+ - name : Install uv
23+ uses : astral-sh/setup-uv@v7
24+
2425 - name : Set up Python ${{ matrix.python-version }}
25- uses : actions/setup-python@v6
26- with :
27- python-version : ${{ matrix.python-version }}
28-
26+ run : uv python install ${{ matrix.python-version }}
27+
2928 - name : Install dependencies
3029 run : |
31- python -m pip install --upgrade pip
32- pip install flake8 pytest pytest-cov
33- if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
34-
35- - name : Install pySEQTarget package
36- run : |
37- pip install -e .
38-
30+ uv venv --python ${{ matrix.python-version }}
31+ uv pip install flake8 pytest pytest-cov
32+ uv pip install -e .
33+
3934 - name : Lint with flake8
4035 run : |
41- # stop the build if there are Python syntax errors or undefined names
42- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
43- # exit-zero treats all errors as warnings
44- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
45-
36+ uv run flake8 . --exclude=.venv --count --select=E9,F63,F7,F82 --show-source --statistics
37+ uv run flake8 . --exclude=.venv --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
38+
4639 - name : Test with pytest
4740 run : |
48- pytest tests/ -v --cov=pySEQTarget --cov-report=xml
41+ uv run pytest tests/ -v --cov=pySEQTarget --cov-report=xml
4942
5043 - name : Upload coverage reports to Codecov
5144 uses : codecov/codecov-action@v5
0 commit comments