Skip to content

build(build): add Pester code coverage to main branch CI#250

Merged
WilliamBerryiii merged 1 commit intomainfrom
build/249-pester-codecov-baseline
Jan 23, 2026
Merged

build(build): add Pester code coverage to main branch CI#250
WilliamBerryiii merged 1 commit intomainfrom
build/249-pester-codecov-baseline

Conversation

@WilliamBerryiii
Copy link
Copy Markdown
Member

Description

Adds Pester code coverage generation to main branch pushes, establishing baseline coverage for Codecov PR comparisons. Also introduces a codecov.yml configuration with status thresholds, carryforward flags, and ignore paths.

Changes:

  • Added pester-tests job to main.yml with OIDC permissions (id-token: write) and code-coverage: true
  • Created codecov.yml with project status (target: auto, 1% threshold), informational patch status (80% target), carryforward flags for pester, and ignore paths for test code and logs
  • Added "rhysd" to .cspell.json dictionary for actionlint checksum references

Related Issue(s)

Fixes #249

Type of Change

Select all that apply:

Code & Documentation:

  • Bug fix (non-breaking change fixing an issue)
  • New feature (non-breaking change adding functionality)
  • Breaking change (fix or feature causing existing functionality to change)
  • Documentation update

Infrastructure & Configuration:

  • GitHub Actions workflow
  • Linting configuration (markdown, PowerShell, etc.)
  • Security configuration
  • DevContainer configuration
  • Dependency update

AI Artifacts:

  • Reviewed contribution with prompt-builder agent and addressed all feedback
  • Copilot instructions (.github/instructions/*.instructions.md)
  • Copilot prompt (.github/prompts/*.prompt.md)
  • Copilot agent (.github/agents/*.agent.md)

Note for AI Artifact Contributors:

  • Agents: Research, indexing/referencing other project (using standard VS Code GitHub Copilot/MCP tools), planning, and general implementation agents likely already exist. Review .github/agents/ before creating new ones.
  • Model Versions: Only contributions targeting the latest Anthropic and OpenAI models will be accepted. Older model versions (e.g., GPT-3.5, Claude 3) will be rejected.
  • See Agents Not Accepted and Model Version Requirements.

Other:

  • Script/automation (.ps1, .sh, .py)
  • Other (please describe):

Sample Prompts (for AI Artifact Contributions)

N/A - This PR does not include AI artifacts.

Testing

  • YAML lint validation passes (pwsh -File scripts/linting/Invoke-YamlLint.ps1)
  • Spell check passes (npm run spell-check)
  • Frontmatter validation passes (npm run lint:frontmatter)
  • Markdown lint passes (npm run lint:md)

Checklist

Required Checks

  • Documentation is updated (if applicable)
  • Files follow existing naming conventions
  • Changes are backwards compatible (if applicable)

AI Artifact Contributions

N/A

Required Automated Checks

The following validation commands must pass before merging:

  • Markdown linting: npm run lint:md
  • Spell checking: npm run spell-check
  • Frontmatter validation: npm run lint:frontmatter
  • Link validation: npm run lint:md-links
  • PowerShell analysis: npm run lint:ps

Security Considerations

  • This PR does not contain any sensitive or NDA information
  • Any new dependencies have been reviewed for security issues
  • Security-related scripts follow the principle of least privilege

Additional Notes

The codecov.yml configuration was added based on research of Codecov best practices:

Setting Value Rationale
coverage.status.project.target auto Automatically uses base branch coverage for comparison
coverage.status.project.threshold 1% Allows minor fluctuation without failing the check
coverage.status.patch.informational true Reports patch coverage without blocking PRs
flags.pester.carryforward true Preserves coverage when pester tests don't run on a commit
ignore scripts/tests/**, logs/** Excludes test code and logs from metrics

📊 - Generated by Copilot

@WilliamBerryiii WilliamBerryiii requested a review from a team as a code owner January 22, 2026 23:49
Copilot AI review requested due to automatic review settings January 22, 2026 23:49
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Jan 22, 2026

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds Pester code coverage generation to main branch CI pushes, establishing a baseline for Codecov to compare against in pull requests. It introduces a codecov.yml configuration file with appropriate thresholds and flags, adds the pester-tests job to the main branch workflow, and includes a necessary spelling dictionary entry.

Changes:

  • Added pester-tests job to main.yml workflow with code coverage enabled, running all tests (not just changed files) on main branch pushes
  • Created codecov.yml configuration with auto-targeting project status, informational patch status, carryforward flags for pester, and appropriate ignore paths
  • Added "rhysd" to .cspell.json dictionary to support the actionlint tool reference in yaml-lint.yml

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/main.yml Adds pester-tests job to main branch CI with OIDC permissions and code coverage enabled; updates extension-package job dependencies to include pester tests
codecov.yml New Codecov configuration defining coverage status thresholds, patch targets, ignore paths, comment behavior, and pester flag with carryforward
.cspell.json Adds "rhysd" to the words dictionary for actionlint repository owner reference

- add pester-tests job to main.yml with OIDC permissions
- add codecov.yml with status thresholds and carryforward flags
- add rhysd to cspell dictionary for actionlint checksums

Fixes #249

📊 - Generated by Copilot
@WilliamBerryiii WilliamBerryiii force-pushed the build/249-pester-codecov-baseline branch from 135151c to 2b2cb64 Compare January 23, 2026 00:02
@WilliamBerryiii WilliamBerryiii merged commit f27656a into main Jan 23, 2026
16 checks passed
@WilliamBerryiii WilliamBerryiii deleted the build/249-pester-codecov-baseline branch January 23, 2026 15:57
WilliamBerryiii added a commit that referenced this pull request Jan 25, 2026
## Description

Adds workflow-level concurrency controls to all three orchestrator
workflows. This prevents unnecessary parallel runs when multiple commits
are pushed in quick succession and reduces GitHub Actions resource
consumption.

**Changes:**

- Added `concurrency` block to `pr-validation.yml` with
`cancel-in-progress: true` to cancel stale PR validation runs when new
commits arrive
- Added `concurrency` block to `main.yml` with `cancel-in-progress:
false` to prevent cancellation of main branch builds
- Added `concurrency` block to `weekly-security-maintenance.yml` with
`cancel-in-progress: false` for scheduled job protection
- Updated `.cspell/general-technical.txt` with missing dictionary terms
(`carryforward`, `SCHED`, `SECCHECK`) that were causing pre-existing
spell-check failures

## Related Issue(s)

Fixes #274

## Type of Change

Select all that apply:

**Code & Documentation:**

- [ ] Bug fix (non-breaking change fixing an issue)
- [ ] New feature (non-breaking change adding functionality)
- [ ] Breaking change (fix or feature causing existing functionality to
change)
- [ ] Documentation update

**Infrastructure & Configuration:**

- [x] GitHub Actions workflow
- [x] Linting configuration (markdown, PowerShell, etc.)
- [ ] Security configuration
- [ ] DevContainer configuration
- [ ] Dependency update

**AI Artifacts:**

- [ ] Reviewed contribution with `prompt-builder` agent and addressed
all feedback
- [ ] Copilot instructions (`.github/instructions/*.instructions.md`)
- [ ] Copilot prompt (`.github/prompts/*.prompt.md`)
- [ ] Copilot agent (`.github/agents/*.agent.md`)

> **Note for AI Artifact Contributors**:
>
> - **Agents**: Research, indexing/referencing other project (using
standard VS Code GitHub Copilot/MCP tools), planning, and general
implementation agents likely already exist. Review `.github/agents/`
before creating new ones.
> - **Model Versions**: Only contributions targeting the **latest
Anthropic and OpenAI models** will be accepted. Older model versions
(e.g., GPT-3.5, Claude 3) will be rejected.
> - See [Agents Not
Accepted](../docs/contributing/custom-agents.md#agents-not-accepted) and
[Model Version
Requirements](../docs/contributing/ai-artifacts-common.md#model-version-requirements).

**Other:**

- [ ] Script/automation (`.ps1`, `.sh`, `.py`)
- [ ] Other (please describe):

## Sample Prompts (for AI Artifact Contributions)

N/A - This PR does not include AI artifacts.

## Testing

- [x] YAML lint validation passes (`npm run lint:yaml`)
- [x] Spell check passes (`npm run spell-check`)

## Checklist

### Required Checks

- [ ] Documentation is updated (if applicable)
- [x] Files follow existing naming conventions
- [x] Changes are backwards compatible (if applicable)
- [ ] Tests added for new functionality (if applicable)

### AI Artifact Contributions

N/A

### Required Automated Checks

The following validation commands must pass before merging:

- [x] Markdown linting: `npm run lint:md`
- [x] Spell checking: `npm run spell-check`
- [x] Frontmatter validation: `npm run lint:frontmatter`
- [ ] Link validation: `npm run lint:md-links`
- [ ] PowerShell analysis: `npm run lint:ps`

## Security Considerations

- [x] This PR does not contain any sensitive or NDA information
- [ ] Any new dependencies have been reviewed for security issues
- [x] Security-related scripts follow the principle of least privilege

## Additional Notes

### Concurrency Configuration Patterns

| Workflow | Group Key | Cancel In-Progress | Rationale |
|----------|-----------|-------------------|-----------|
| `pr-validation.yml` | `workflow-head_ref` | `true` | Cancel stale PR
runs when new commits arrive |
| `main.yml` | `workflow-ref` | `false` | Protect main branch builds
from cancellation |
| `weekly-security-maintenance.yml` | `workflow` | `false` | Single
weekly job, no ref variation needed |

### Dictionary Updates

Fixed pre-existing spell-check gaps that passed CI due to timing:

- `carryforward` - Codecov configuration term (PR #250)
- `SCHED`, `SECCHECK` - Mermaid diagram labels (PR #252)

⚡ - Generated by Copilot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Issue]: Add Pester code coverage on main branch pushes for Codecov baseline

3 participants