Commit 94c764e
committed
Merge #95: Add coverage CI workflow
b4092b6 fix: [#90] add SKIP_AI_ENFORCEMENT to coverage steps (copilot-swe-agent[bot])
7653193 fix: [#90] add explicit permissions to coverage workflow (copilot-swe-agent[bot])
5afe9f8 feat: [#90] add coverage CI workflow (copilot-swe-agent[bot])
213b269 Initial plan (copilot-swe-agent[bot])
Pull request description:
- [x] Add `SKIP_AI_ENFORCEMENT: 1` environment variable to coverage steps
- [x] Applied to both `coverage-text` and `coverage-html` steps
- [x] Matches pattern from `testing.yml` workflow
- [x] Skips AI enforcement tests that require third-party tools (cargo machete, Ansible, OpenTofu)
- [x] YAML linting passes
<!-- START COPILOT CODING AGENT SUFFIX -->
<details>
<summary>Original prompt</summary>
>
> ----
>
> *This section details on the original issue you should resolve*
>
> <issue_title>Create coverage CI workflow</issue_title>
> <issue_description>**Parent Epic**: #85
>
> ## Overview
>
> Create a GitHub Actions workflow to generate code coverage reports on every push and pull request. The workflow generates coverage in two formats: a text summary for immediate viewing in the workflow output, and an HTML report uploaded as an artifact for detailed inspection.
>
> **Note**: This issue does NOT include Codecov or other external coverage service integration.
>
> ## Goals
>
> - [ ] Generate coverage reports automatically in CI/CD for all branches
> - [ ] Display coverage summary in workflow output (text format)
> - [ ] Make detailed HTML coverage reports available as artifacts
> - [ ] Add `.coverage/` directory to `.gitignore`
>
> ## Specifications
>
> ### Workflow Structure
>
> **Trigger Events**: Push and pull_request (following `testing.yml` pattern)
>
> **Job**: Single `coverage` job with these steps:
>
> 1. Checkout code - `actions/checkout@v4`
> 2. Setup Rust toolchain - `dtolnay/rust-toolchain@stable`
> 3. Enable caching - `Swatinem/rust-cache@v2`
> 4. Install cargo-llvm-cov - `taiki-e/install-action@v2`
> 5. Generate text coverage - `cargo cov`
> 6. Generate HTML report - `cargo cov-html`
> 7. Upload HTML artifact - `actions/upload-artifact@v4`
>
> ### Example Workflow
>
> ```yaml
> name: Coverage
>
> on:
> push:
> pull_request:
>
> env:
> CARGO_TERM_COLOR: always
>
> jobs:
> coverage:
> name: Coverage Report
> runs-on: ubuntu-latest
>
> steps:
> - id: checkout
> name: Checkout Repository
> uses: actions/checkout@v4
>
> - id: setup
> name: Setup Toolchain
> uses: dtolnay/rust-toolchain@stable
>
> - id: cache
> name: Enable Workflow Cache
> uses: Swatinem/rust-cache@v2
>
> - id: install-llvm-cov
> name: Install cargo-llvm-cov
> uses: taiki-e/install-action@v2
> with:
> tool: cargo-llvm-cov
>
> - id: coverage-text
> name: Generate Text Coverage Summary
> run: cargo cov
>
> - id: coverage-html
> name: Generate HTML Coverage Report
> run: cargo cov-html
>
> - id: upload-coverage
> name: Upload HTML Coverage Report
> uses: actions/upload-artifact@v4
> with:
> name: coverage-html-report
> path: target/llvm-cov/html/
> retention-days: 30
> ```
>
> ## Implementation Plan
>
> ### Phase 1: Update .gitignore (5 minutes)
>
> - [ ] Add `.coverage/` directory to `.gitignore` with comment
>
> ### Phase 2: Create Workflow (15 minutes)
>
> - [ ] Create `.github/workflows/coverage.yml`
> - [ ] Add trigger events and environment variables
> - [ ] Set up job structure
>
> ### Phase 3: Configure Toolchain (10 minutes)
>
> - [ ] Add Rust toolchain setup, caching, and cargo-llvm-cov installation
>
> ### Phase 4: Generate Reports (15 minutes)
>
> - [ ] Add text and HTML coverage generation steps
>
> ### Phase 5: Upload Artifact (10 minutes)
>
> - [ ] Add artifact upload step with 30-day retention
>
> ### Phase 6: Testing (15 minutes)
>
> - [ ] Test workflow on a feature branch
> - [ ] Verify text output and HTML artifact availability
>
> ## Acceptance Criteria
>
> - [ ] `.coverage/` directory added to `.gitignore`
> - [ ] Workflow file exists at `.github/workflows/coverage.yml`
> - [ ] Workflow triggers on push and pull_request
> - [ ] Text coverage summary visible in workflow output
> - [ ] HTML coverage artifact uploaded with 30-day retention
> - [ ] Workflow does NOT block CI/CD on coverage failures
>
> ## Notes
>
> - Uses `cov` and `cov-html` aliases from `.cargo/config.toml`
> - Follows patterns from existing `testing.yml` workflow
> - Non-blocking by design - coverage is informational only
> - Future enhancement: External coverage service integration can be added later</issue_description>
>
> ## Comments on the Issue (you are @copilot in this section)
>
> <comments>
> </comments>
>
</details>
- Fixes #87
<!-- START COPILOT CODING AGENT TIPS -->
---
💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey).
ACKs for top commit:
josecelano:
ACK b4092b6
Tree-SHA512: f5ee09387a3b4de3183ec90dcccebe771b8925722be123dd1715bfdb6fa3058fa5958548a2893ead822256cd33879e69438e59165866a50736a18123569c44d41 file changed
+55
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
0 commit comments