fixed tests
Test CI Templates / validate-syntax (push) Successful in 11s
Test CI Templates / test-python-code-quality (3.11) (push) Failing after 5s
Test CI Templates / test-python-pytest (true, 3.12) (push) Failing after 4s
Test CI Templates / test-web-formatting (true, false, 20) (push) Failing after 5s
Test CI Templates / test-python-code-quality (3.10) (push) Failing after 5s
Test CI Templates / test-python-code-quality (3.12) (push) Failing after 5s
Test CI Templates / test-python-code-quality (false, false, basic) (push) Failing after 5s
Test CI Templates / test-python-code-quality (false, true, skip-pyupgrade) (push) Failing after 5s
Test CI Templates / test-python-pytest (false, 3.11) (push) Failing after 5s
Test CI Templates / test-python-pytest (false, 3.12) (push) Failing after 5s
Test CI Templates / test-python-pytest (true, 3.11) (push) Failing after 5s
Test CI Templates / test-web-formatting (false, false, 20) (push) Failing after 5s
Test CI Templates / test-web-formatting (false, true, 18) (push) Failing after 5s
Test CI Templates / test-web-formatting (false, true, 20) (push) Failing after 5s
Test CI Templates / test-web-formatting (true, false, 18) (push) Failing after 5s
Test CI Templates / test-monorepo (push) Failing after 5s
Test CI Templates / test-web-formatting (true, true, 18) (push) Failing after 5s
Test CI Templates / test-web-formatting (true, true, 20) (push) Failing after 5s
Test CI Templates / test-results (push) Successful in 2s
Test CI Templates / test-python-code-quality (true, false, skip-mypy) (push) Failing after 5s
Test CI Templates / test-web-formatting (false, false, 18) (push) Failing after 5s
Test CI Templates / test-edge-cases (push) Failing after 5s

This commit is contained in:
Brian Bjarke Jensen
2025-09-19 20:25:51 +02:00
parent 9abca60246
commit 243a5432d8
12 changed files with 225 additions and 173 deletions
+8 -3
View File
@@ -1,6 +1,7 @@
---
name: Python Code Quality Pipeline
on:
"on":
workflow_call:
inputs:
python-version:
@@ -36,7 +37,7 @@ jobs:
defaults:
run:
working-directory: ${{ inputs.working-directory }}
steps:
- name: Checkout code
uses: actions/checkout@v4
@@ -71,4 +72,8 @@ jobs:
- name: Pyupgrade check
if: ${{ !inputs.skip-pyupgrade }}
run: uv run pyupgrade --py312-plus $(git ls-files '*.py') && git diff --exit-code
run: |
echo "Running pyupgrade..."
uv run pyupgrade --py312-plus $(git ls-files '*.py')
echo "Checking for changes..."
git diff --exit-code
+15 -5
View File
@@ -1,6 +1,7 @@
---
name: Python Test Pipeline
on:
"on":
workflow_call:
inputs:
python-version:
@@ -49,7 +50,7 @@ jobs:
defaults:
run:
working-directory: ${{ inputs.working-directory }}
steps:
- name: Checkout code
uses: actions/checkout@v4
@@ -77,13 +78,20 @@ jobs:
PYTHONPATH: .
run: |
if [ -n "${{ inputs.coverage-package }}" ]; then
uv run pytest --cov=${{ inputs.coverage-package }} --cov-report=term-missing ${{ inputs.pytest-args }} > coverage.txt
uv run pytest --cov=${{ inputs.coverage-package }} \
--cov-report=term-missing ${{ inputs.pytest-args }} > coverage.txt
else
uv run pytest ${{ inputs.pytest-args }}
fi
- name: Post coverage summary to PR
if: ${{ !inputs.skip-coverage-comment && inputs.coverage-package != '' && github.event_name == 'pull_request' && inputs.api-url != '' }}
if: >-
${{
!inputs.skip-coverage-comment &&
inputs.coverage-package != '' &&
github.event_name == 'pull_request' &&
inputs.api-url != ''
}}
env:
API_URL: ${{ inputs.api-url }}
REPO_OWNER: ${{ github.repository_owner }}
@@ -94,7 +102,9 @@ jobs:
if [ -f coverage.txt ]; then
COVERAGE=$(cat coverage.txt)
COMMENT_BODY="**Test Coverage Report:**\n\`\`\`\n$COVERAGE\n\`\`\`"
curl -s -X POST "$API_URL/repos/$REPO_OWNER/$REPO_NAME/issues/$PR_NUMBER/comments" \
API_ENDPOINT="$API_URL/repos/$REPO_OWNER/$REPO_NAME/issues/$PR_NUMBER/comments"
curl -s -X POST \
"$API_ENDPOINT" \
-H "Authorization: token $CI_RUNNER_TOKEN" \
-H "Content-Type: application/json" \
-d "{\"body\": \"$COMMENT_BODY\"}"