File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919
2020 defaults :
2121 run :
22- working-directory : backend
22+ working-directory : backends/fastapi
2323
2424 steps :
2525 - name : Checkout code
@@ -30,24 +30,21 @@ jobs:
3030 with :
3131 python-version : ' 3.12'
3232
33- - name : Cache pip dependencies
34- uses : actions/cache@v4
33+ - name : Install uv
34+ uses : astral-sh/setup-uv@v5
3535 with :
36- path : ~/.cache/pip
37- key : ${{ runner.os }}-pip-${{ hashFiles('backend/pyproject.toml') }}
38- restore-keys : |
39- ${{ runner.os }}-pip-
36+ enable-cache : true
37+ cache-dependency-glob : " backends/fastapi/pyproject.toml"
4038
4139 - name : Install dependencies
4240 run : |
43- python -m pip install --upgrade pip
44- pip install -e ".[dev]"
41+ uv sync --all-extras
4542
4643 - name : Run pylint
4744 id : pylint
4845 run : |
4946 echo "Running pylint..."
50- if pylint app > pylint-output.txt 2>&1; then
47+ if uv run pylint app > pylint-output.txt 2>&1; then
5148 echo "PYLINT_PASSED=true" >> $GITHUB_ENV
5249 echo "No pylint errors found!"
5350 else
6158 id : ruff
6259 run : |
6360 echo "Running ruff check..."
64- if ruff check app > ruff-output.txt 2>&1; then
61+ if uv run ruff check app > ruff-output.txt 2>&1; then
6562 echo "RUFF_PASSED=true" >> $GITHUB_ENV
6663 echo "No ruff errors found!"
6764 else
7673 run : |
7774 echo "Running mypy..."
7875 cd app
79- if mypy . > ../mypy-output.txt 2>&1; then
76+ if uv run mypy . > ../mypy-output.txt 2>&1; then
8077 echo "MYPY_PASSED=true" >> $GITHUB_ENV
8178 echo "No mypy errors found"
8279 else
You can’t perform that action at this time.
0 commit comments