Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions .github/workflows/reusable-ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# file: .github/workflows/reusable-ci.yml
# version: 1.14.0
# version: 1.15.0
# guid: reusable-ci-2025-09-24-core-workflow

name: Reusable CI Workflow
Expand Down Expand Up @@ -409,7 +409,12 @@ jobs:
fail-fast: false
matrix: ${{ fromJSON(needs.load-config.outputs.go-matrix) }}
runs-on: ${{ matrix.os }}
timeout-minutes: 30
# 40, not 30: the go-test helper runs `go test -race` with no -timeout, so
# a hung test binary is killed by Go's default 10m. The cap must exceed
# setup (~4.5m) + the slowest measured suite (~20.5m) + that 10m, or the
# runner cancels the job before Go prints the goroutine dump naming the
# stuck test.
timeout-minutes: 40
permissions:
contents: read
env:
Expand Down Expand Up @@ -481,13 +486,15 @@ jobs:
command: go-test
coverage-threshold: ${{ inputs.coverage-threshold || needs.load-config.outputs.coverage-threshold }}

# Only feeds go-test-coverage, which exits at once without .testcoverage.yml;
# without the file this step was a dead full-suite rerun (6-8 min).
- name: Generate Go coverage profile
if: ${{ !inputs.skip-tests }}
if: ${{ !inputs.skip-tests && hashFiles('.testcoverage.yml') != '' }}
continue-on-error: true
run: go test ./... -coverprofile=./cover.out -covermode=atomic -coverpkg=./...

- name: Check Go test coverage
if: ${{ !inputs.skip-tests }}
if: ${{ !inputs.skip-tests && hashFiles('.testcoverage.yml') != '' }}
continue-on-error: true
uses: vladopajic/go-test-coverage@f94bcf0d6b9fa5fb8b783830b22648f6c17475e2 # v2.19.0
with:
Expand Down
6 changes: 6 additions & 0 deletions changelog.d/20261005_go_ci_skip_dead_coverage_rerun.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
### Fixed

#### reusable-ci: no dead coverage rerun, 40-minute Go CI cap

- "Generate Go coverage profile" and "Check Go test coverage" now run only when the repo has `.testcoverage.yml`. Without it the first step re-ran the whole suite (6–8 min) for a checker that exits immediately, which pushed audiobook-organizer's go-ci over its 30-minute cap.
- `go-ci` `timeout-minutes` is now 40, so a hung test is killed by Go's 10-minute test timeout (with a goroutine dump naming it) before the runner cancels the job.
Loading