diff --git a/.github/codecov.yml b/.github/codecov.yml index 3affc71..f53212f 100644 --- a/.github/codecov.yml +++ b/.github/codecov.yml @@ -32,7 +32,7 @@ coverage: # Only post status if coverage changes if_ci_failed: error # Informational only, don't block PR - informational: false + informational: true # Compare against base commit base: auto @@ -45,8 +45,8 @@ coverage: threshold: 5% # Only check if patch has changes if_not_found: success - # Only check new lines - only_pulls: false + # Informational only, don't block PR + informational: true # Changes status (diff between head and base) changes: @@ -64,7 +64,7 @@ coverage: # Pull request comment configuration comment: - # Layout for PR comments (modern condensed format) + # Layout for PR comments (Free tier compatible) layout: "condensed_header, condensed_files, condensed_footer" # Update existing comment instead of creating new ones behavior: default diff --git a/.github/workflows/reusable-ci.yml b/.github/workflows/reusable-ci.yml index 161ff28..dd2e11d 100644 --- a/.github/workflows/reusable-ci.yml +++ b/.github/workflows/reusable-ci.yml @@ -402,24 +402,42 @@ jobs: with: save-if: ${{ github.ref == 'refs/heads/main' }} - - name: Generate coverage with nextest + - name: Generate coverage for all tests run: | cargo llvm-cov nextest --all-features --workspace --lcov --output-path lcov.info + - name: Validate coverage file + run: | + set -euo pipefail + echo "=== Validating LCOV file ===" + if [ ! -f "lcov.info" ]; then + echo "ERROR: lcov.info not found" + exit 1 + fi + size=$(wc -c < "lcov.info") + lines=$(wc -l < "lcov.info") + echo "✓ lcov.info: ${size} bytes, ${lines} lines" + if [ "$size" -eq 0 ]; then + echo "ERROR: lcov.info is empty" + exit 1 + fi + echo "First 10 lines:" + head -10 "lcov.info" + - name: Generate JUnit XML test results if: success() || failure() run: | mkdir -p target/nextest/ci cargo nextest run --all-features --workspace --profile ci --no-fail-fast || true - - name: "Codecov: Upload code coverage" + - name: "Codecov: Upload coverage" uses: codecov/codecov-action@v5 with: files: ./lcov.info fail_ci_if_error: false use_oidc: true - flags: unittests name: codecov-coverage + verbose: true - name: "Codecov: Upload test results" if: success() || failure() @@ -427,7 +445,6 @@ jobs: with: files: ./target/nextest/ci/junit.xml use_oidc: true - flags: unittests name: codecov-test-results - name: Generate HTML coverage report @@ -449,7 +466,7 @@ jobs: echo "### Code Coverage" >> $GITHUB_STEP_SUMMARY echo "- LCOV report: \`lcov.info\`" >> $GITHUB_STEP_SUMMARY echo "- HTML report: \`target/llvm-cov/html/\`" >> $GITHUB_STEP_SUMMARY - echo "- [View Coverage Dashboard](https://codecov.io/gh/RAprogramm/masterror)" >> $GITHUB_STEP_SUMMARY + echo "- [View Coverage Dashboard](https://app.codecov.io/gh/RAprogramm/masterror)" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY echo "### Test Analytics" >> $GITHUB_STEP_SUMMARY echo "- JUnit XML: \`target/nextest/ci/junit.xml\`" >> $GITHUB_STEP_SUMMARY diff --git a/README.md b/README.md index 18e7a18..56065ab 100644 --- a/README.md +++ b/README.md @@ -489,4 +489,3 @@ assert_eq!(problem.grpc.expect("grpc").name, "UNAUTHENTICATED"); MSRV: **1.90** · License: **MIT OR Apache-2.0** · No `unsafe` -