feat: Move comprehensive coverage check workflow before approved (#9482)
* Add comprehensive coverage check workflow Created a dedicated workflow that runs code coverage before PR approval: 🚀 Coverage Runs Early: - Triggers: Push to branches + PR events (opened, sync, ready_for_review) - Smart filtering: Only runs when backend code changes - Fast feedback: Unit tests only for quick coverage results 📊 Comprehensive Reporting: - CodeCov integration with proper flags and naming - PR comments with coverage status and links - Workflow summary with coverage percentage - Coverage artifacts (XML + HTML) saved for review ⚡ Intelligent Execution: - Path filtering: src/backend/**, pyproject.toml, uv.lock - Branch filtering: main, develop, feature/**, fix/**, hotfix/** - Draft protection: Skips draft PRs - Dynamic naming: Different names for push vs PR contexts 🎯 Benefits: - Developers get immediate coverage feedback on push - Reviewers see coverage context during PR review - Coverage issues caught before approval, not after - Continuous monitoring of coverage trends across branches This replaces the previous "coverage after approval" approach with "coverage before approval" - exactly what was requested! 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * Remove all restrictions from coverage workflow - Coverage now runs on ANY push to ANY branch - Coverage runs on ANY PR with ANY changes - No path filtering - runs regardless of what files changed - No branch filtering - runs on all branches - Ensures coverage runs on every PR as requested * move test to be run when we submit pr * Configure CI to run tests before PR approval - Remove 'lgtm' label requirement from CI trigger - Run tests immediately on PR opened/synchronized events - Add ci.yml to path filters to trigger tests when workflow changes - Coverage and tests now run before approval for early feedback 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * add labeled --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
parent
836faa73d6
commit
2d5c559261
2 changed files with 4 additions and 2 deletions
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
|
@ -38,7 +38,7 @@ on:
|
|||
type: string
|
||||
default: "['3.10']"
|
||||
pull_request:
|
||||
types: [synchronize, labeled]
|
||||
types: [opened, synchronize, labeled]
|
||||
merge_group:
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
|
|
@ -120,7 +120,7 @@ jobs:
|
|||
name: Should Run CI
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
should-run-ci: ${{ (contains( github.event.pull_request.labels.*.name, 'lgtm') && github.event.pull_request.draft == false) || (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'merge_group') }}
|
||||
should-run-ci: ${{ (github.event.pull_request.draft == false) || (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call' || github.event_name == 'merge_group') }}
|
||||
should-run-tests: ${{ !contains(github.event.pull_request.labels.*.name, 'fast-track') || github.event_name == 'workflow_call' || github.event_name == 'workflow_dispatch' || github.event_name == 'merge_group' }}
|
||||
steps:
|
||||
# Do anything just to make the job run
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue