diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index e405e90..ac9bd3e 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -53,23 +53,38 @@ jobs: - name: Generate coverage badges run: | COMMIT_HASH=$(git rev-parse --short HEAD) + echo "Generating badges for commit: ${COMMIT_HASH}" # Generate test coverage badge or error badge if [ "${{ steps.pytest.outcome }}" == "success" ] && [ -f coverage.json ]; then + echo "Generating successful test coverage badge..." coverage-badge -o coverage-${COMMIT_HASH}.svg + echo "Test coverage badge created: coverage-${COMMIT_HASH}.svg" else - # Create error badge for test coverage + echo "Generating error badge for test coverage (pytest outcome: ${{ steps.pytest.outcome }})" curl -o coverage-${COMMIT_HASH}.svg "https://img.shields.io/badge/coverage-error-red.svg" + echo "Error test coverage badge created: coverage-${COMMIT_HASH}.svg" fi # Generate docs coverage badge or error badge if [ "${{ steps.docs.outcome }}" == "success" ]; then + echo "Generating successful docs coverage badge..." interrogate --generate-badge coverage-docs-${COMMIT_HASH}.svg pyWebLayout/ + echo "Docs coverage badge created: coverage-docs-${COMMIT_HASH}.svg" else - # Create error badge for docs coverage + echo "Generating error badge for docs coverage (docs outcome: ${{ steps.docs.outcome }})" curl -o coverage-docs-${COMMIT_HASH}.svg "https://img.shields.io/badge/docs-error-red.svg" + echo "Error docs coverage badge created: coverage-docs-${COMMIT_HASH}.svg" fi + # List all SVG files created + echo "SVG files in directory:" + ls -la *.svg || echo "No SVG files found" + echo "Current working directory:" + pwd + echo "All files in current directory:" + ls -la + - name: Generate coverage reports if: steps.pytest.outcome == 'success' run: | @@ -90,6 +105,17 @@ jobs: print('No coverage data found') " + - name: Debug artifacts before upload + run: | + echo "Files matching coverage patterns:" + ls -la coverage-*.svg || echo "No coverage-*.svg files found" + ls -la coverage-docs-*.svg || echo "No coverage-docs-*.svg files found" + ls -la coverage.json || echo "No coverage.json found" + ls -la coverage-summary.txt || echo "No coverage-summary.txt found" + ls -la htmlcov/ || echo "No htmlcov directory found" + echo "All files in current directory:" + ls -la + - name: Upload coverage artifacts uses: actions/upload-artifact@v3 with: diff --git a/README.md b/README.md index 5f24931..185fca3 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ | Badge | Description | |-------|-------------| -| ![Test Coverage](https://gitea.tourolle.paris/dtourolle/pyWebLayout/actions/runs/latest/artifacts/coverage-reports/coverage-8236ee7.svg) | **Test Coverage** - Percentage of code covered by unit tests | -| ![Documentation Coverage](https://gitea.tourolle.paris/dtourolle/pyWebLayout/actions/runs/latest/artifacts/coverage-reports/coverage-docs-8236ee7.svg) | **Documentation Coverage** - Percentage of code with docstrings | +| ![Test Coverage](https://gitea.tourolle.paris/dtourolle/pyWebLayout/actions/runs/latest/artifacts/coverage-reports/coverage-9baabc2.svg) | **Test Coverage** - Percentage of code covered by unit tests | +| ![Documentation Coverage](https://gitea.tourolle.paris/dtourolle/pyWebLayout/actions/runs/latest/artifacts/coverage-reports/coverage-docs-9baabc2.svg) | **Documentation Coverage** - Percentage of code with docstrings | | ![Build Status](./build-status.svg) | **Build Status** - Current CI/CD pipeline status | | ![License](https://img.shields.io/badge/license-MIT-blue.svg) | **License** - Project licensing information | A Python library for HTML-like layout and rendering.