-
Notifications
You must be signed in to change notification settings - Fork 125
Closed
Labels
needs-triageRequires triage and prioritizationRequires triage and prioritization
Description
Issue Description
Codecov cannot compare PR coverage against the base branch because no code coverage is generated when commits merge to main. This results in warnings like:
⚠️ There is no BASE report for this PR. The following commits on main have no coverage data.
Current behavior:
pr-validation.ymlcallspester-tests.ymlwithcode-coverage: trueon pull requestsmain.ymlruns on push tomainbut does not include Pester tests or coverage reporting- Codecov has no baseline to compare against for coverage diff calculations
- No Codecov configuration exists for status thresholds, carryforward flags, or ignore paths
Expected behavior:
Pushes to main should generate and upload code coverage to Codecov, establishing a baseline for PR comparisons. Codecov should be configured with appropriate thresholds and flags.
Proposed solution
1. Add pester-tests job to main.yml
pester-tests:
name: PowerShell Tests
uses: ./.github/workflows/pester-tests.yml
permissions:
contents: read
id-token: write
with:
soft-fail: false
changed-files-only: false
code-coverage: true2. Add codecov.yml configuration
Create a codecov.yml at the repository root with:
- Status thresholds: Use
target: autoto compare against base branch, allow 1% threshold for project status - Patch coverage: Set informational patch status to encourage good coverage on new code without blocking PRs
- Carryforward flags: Enable
carryforward: trueon thepesterflag to preserve coverage when tests don't run - Ignore paths: Exclude test code and logs directories from coverage calculations
- PR comments: Configure to only comment when coverage changes
coverage:
status:
project:
default:
target: auto
threshold: 1%
patch:
default:
target: 80%
informational: true
ignore:
- "scripts/tests/**"
- "logs/**"
comment:
layout: "reach,diff,flags,files"
behavior: default
require_changes: true
flags:
pester:
paths:
- "scripts/**"
carryforward: trueAdditional Context
- Observed in PR feat(docs): add GOVERNANCE.md for OSSF Silver Badge compliance #235 where Codecov reported missing BASE coverage for commit a34822a
- Related workflow:
.github/workflows/pester-tests.yml - This will also validate that merged code passes tests and provide coverage trend tracking over time
- Codecov docs: Status Configuration, Carryforward Flags
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
needs-triageRequires triage and prioritizationRequires triage and prioritization