@@ -18,29 +18,31 @@ jobs:
1818 runs-on : ubuntu-latest
1919
2020 steps :
21- - uses : actions/checkout@v3
21+ - uses : actions/checkout@v4
2222 - name : Set up Python 3.12
23- uses : actions/setup-python@v3
23+ uses : actions/setup-python@v5
2424 with :
2525 python-version : " 3.12"
26- - name : Install dependencies
26+ - name : Install uv
27+ uses : astral-sh/setup-uv@v7
28+ with :
29+ enable-cache : true
30+ - name : Create env and install dependencies
2731 run : |
28- python -m pip install --upgrade pip
29- pip install flake8 pytest
30- if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
31- if [ -f dev-requirements.txt ]; then pip install -r dev-requirements.txt; fi
32+ uv venv
33+ uv pip install -e ".[dev]"
3234 - name : Lint with flake8
3335 run : |
3436 # stop the build if there are Python syntax errors or undefined names
35- flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
37+ uv run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
3638 # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
37- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
39+ uv run flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
3840 - name : Test with pytest
3941 run : |
40- pytest
42+ uv run pytest --cov=vistopia --cov-report=xml
4143 - name : Type check with mypy
4244 run : |
43- mypy .
45+ uv run mypy .
4446 - uses : codecov/codecov-action@v4
4547 with :
4648 token : ${{ secrets.CODECOV_TOKEN }}
0 commit comments