Skip to content

Commit e113595

Browse files
committed
refactor: make coverage workflow depend on CI success
- Coverage workflow now only runs after CI workflow completes successfully - Prevents wasted resources running coverage when tests are failing - Add Codecov badge to README for coverage visibility - Remove redundant branch filter from workflow_run trigger This ensures coverage only runs on green builds, saving CI minutes and providing clearer feedback about the actual state of the codebase.
1 parent 2bea016 commit e113595

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/coverage.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: Coverage
22

33
on:
4-
push:
5-
branches: [ master, main ]
6-
pull_request:
7-
branches: [ master, main ]
4+
workflow_run:
5+
workflows: ["CI"]
6+
types:
7+
- completed
88

99
env:
1010
CARGO_TERM_COLOR: always
@@ -13,6 +13,8 @@ jobs:
1313
coverage:
1414
name: Code Coverage
1515
runs-on: ubuntu-latest
16+
# Only run if CI workflow succeeded
17+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1618
steps:
1719
- uses: actions/checkout@v4
1820

0 commit comments

Comments
 (0)