From 9cba668088f944065fcad32788adf48afe87c7ed Mon Sep 17 00:00:00 2001 From: dresber Date: Mon, 18 May 2026 22:06:51 +0200 Subject: [PATCH] support other project structure for app folders --- .gitea/workflows/python-checks.yml | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/python-checks.yml b/.gitea/workflows/python-checks.yml index 69a05f7..00f2748 100644 --- a/.gitea/workflows/python-checks.yml +++ b/.gitea/workflows/python-checks.yml @@ -6,9 +6,21 @@ on: python_version: type: string default: "3.14" + source_path: + type: string + default: "app" + tests_path: + type: string + default: "tests" test_command: type: string default: "coverage run -m pytest" + coverage_fail_under: + type: string + default: "60" + run_security_scan: + type: boolean + default: true jobs: check: @@ -26,24 +38,25 @@ jobs: - name: Install Tools & Deps run: | python -m pip install --upgrade pip setuptools wheel - pip install -e .[dev] || pip install -e .[test] || pip install -e . + pip install -e ".[dev]" || pip install -e ".[test]" || pip install -e . pip install ruff coverage pip-audit bandit - name: Linting - run: ruff check app tests + run: ruff check ${{ inputs.source_path }} ${{ inputs.tests_path }} - name: Tests run: | ${{ inputs.test_command }} - coverage report --fail-under=60 + coverage report --fail-under=${{ inputs.coverage_fail_under }} coverage xml coverage html - name: Security Scan + if: ${{ inputs.run_security_scan }} run: | pip freeze | grep -v "git+" > req.txt pip-audit -r req.txt - bandit -r app/ + bandit -r ${{ inputs.source_path }} - name: Upload Coverage HTML if: always()