diff --git a/fastapi_template/template/{{cookiecutter.project_name}}/.github/workflows/tests.yml b/fastapi_template/template/{{cookiecutter.project_name}}/.github/workflows/tests.yml index a9c8603..caee399 100644 --- a/fastapi_template/template/{{cookiecutter.project_name}}/.github/workflows/tests.yml +++ b/fastapi_template/template/{{cookiecutter.project_name}}/.github/workflows/tests.yml @@ -7,23 +7,22 @@ jobs: strategy: matrix: cmd: - - black + - ruff-format - ruff - mypy runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: Install poetry - run: pipx install poetry - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: - python-version: '3.11' - cache: 'poetry' + python-version: '3.12' + - name: Set up UV + uses: astral-sh/setup-uv@v6 - name: Install deps - run: poetry install + run: uv sync - name: Run lint check - run: poetry run pre-commit run -a {{ '${{' }} matrix.cmd {{ '}}' }} + run: uv run pre-commit run -a {{ '${{' }} matrix.cmd {{ '}}' }} pytest: runs-on: ubuntu-latest steps: @@ -31,13 +30,12 @@ jobs: - name: Create .env run: touch .env - name: Set up Python - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: - python-version: '3.11' + python-version: '3.12' - name: Update docker-compose uses: KengoTODA/actions-setup-docker-compose@v1 with: version: "2.28.0" - name: run tests run: docker-compose run --rm api pytest -vv - diff --git a/fastapi_template/template/{{cookiecutter.project_name}}/alembic.ini b/fastapi_template/template/{{cookiecutter.project_name}}/alembic.ini index dc44727..0974229 100644 --- a/fastapi_template/template/{{cookiecutter.project_name}}/alembic.ini +++ b/fastapi_template/template/{{cookiecutter.project_name}}/alembic.ini @@ -7,14 +7,15 @@ output_encoding = utf-8 [post_write_hooks] -hooks = black,ruff +hooks = ruff_format,ruff_check -black.type = console_scripts -black.entrypoint = black +ruff_format.type = exec +ruff_format.executable = ruff +ruff_format.options = format REVISION_SCRIPT_FILENAME -ruff.type = exec -ruff.executable = ruff -ruff.options = check --fix REVISION_SCRIPT_FILENAME --ignore N999 +ruff_check.type = exec +ruff_check.executable = ruff +ruff_check.options = check --fix REVISION_SCRIPT_FILENAME --ignore N999 # Logging configuration [loggers]