1313 - main
1414
1515env : # environment variables (available in any part of the action)
16- NODE_VERSION : 21
16+ NODE_VERSION : 22
1717 PYTHON_VERSION : 3.12
1818 MONGODB_VERSION : 8.0
1919
@@ -53,10 +53,19 @@ jobs:
5353 - name : Check out Git repository
5454 uses : actions/checkout@v4
5555
56- - name : Run black
57- uses : psf/black@stable
56+ - name : Install uv
57+ uses : astral-sh/setup-uv@v5
5858 with :
59- options : " --config backend/pyproject.toml"
59+ enable-cache : true
60+
61+ - name : Run black
62+ run : uv run --group dev black --check --config ./pyproject.toml .
63+
64+ - name : Run mypy
65+ run : uv run --group dev mypy --config-file=pyproject.toml
66+
67+ - name : Run ruff
68+ run : uv run --group dev ruff check
6069
6170 test-backend :
6271 name : Run backend unit tests
@@ -70,28 +79,18 @@ jobs:
7079 - name : Git checkout
7180 uses : actions/checkout@v4
7281
73- - name : Install poetry
74- run : pipx install poetry
75-
76- - name : Set up Python
77- uses : actions/setup-python@v5
82+ - name : Install uv
83+ uses : astral-sh/setup-uv@v5
7884 with :
79- python-version : ${{ env.PYTHON_VERSION }}
80- cache : " poetry"
85+ enable-cache : true
8186
8287 - name : Start MongoDB
8388 uses : supercharge/mongodb-github-action@1.11.0
8489 with :
8590 mongodb-version : ${{ env.MONGODB_VERSION }}
8691
87- # Install dependencies. `--no-root` means "install all dependencies but not the project
88- # itself", which is what you want to avoid caching _your_ code. The `if` statement
89- # ensures this only runs on a cache miss.
90- - name : Install dependencies
91- run : poetry install --no-interaction --no-root --with dev
92-
9392 - name : Test with pytest
94- run : poetry run pytest --cov=app tests --cov-report html
93+ run : uv run --group dev pytest --cov=app tests --cov-report html
9594
9695 # upload-artifact action does not take into account working-directory default
9796 # see https://github.com/actions/upload-artifact/issues/232
0 commit comments