From d35ffd04ccf302e2a6aba11b14fe334c5d04fce9 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Mon, 8 Dec 2025 20:17:00 +0900 Subject: [PATCH] fixup! .gitea/workflows: init test pipeline --- .gitea/workflows/test.yaml | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/test.yaml b/.gitea/workflows/test.yaml index 010bb19..8b408c4 100644 --- a/.gitea/workflows/test.yaml +++ b/.gitea/workflows/test.yaml @@ -2,6 +2,12 @@ name: Run tests on: pull_request: push: + workflow_dispatch: + inputs: + debug_sqlalchemy: + description: "Print SQL statements executed by SQLAlchemy during tests" + type: boolean + default: false jobs: run-tests: runs-on: debian-latest @@ -15,7 +21,20 @@ jobs: run: uv sync --locked - name: Run tests - run: uv tool run pytest --cov=dibbler --cov-report=html + run: | + PYTEST_ARGS=( + --cov=dibbler + --cov-report=html + --cov-branch + ) + + if [ "${{ inputs.debug_sqlalchemy }}" == "true" ]; then + PYTEST_ARGS+=( + --echo + ) + fi + + uv run -- pytest --cov=dibbler --cov-report=html - name: Generate badge run: uvx coverage-badge -o htmlcov/badge.svg