Skip to content
Open
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
7 changes: 4 additions & 3 deletions .github/workflows/go-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -270,11 +270,12 @@ jobs:
echo "::warning::Coverage report format changed — Summary Complexity not patched. Check CodeCoverageSummary version."
fi

: > /tmp/cov-func.txt
COV_FUNC="$RUNNER_TEMP/cov-func.txt"
: > "$COV_FUNC"
while IFS= read -r mod; do
[ -z "$mod" ] && continue
safe=$(echo "$mod" | tr '/' '_')
(cd "$mod" && go tool cover -func="$GITHUB_WORKSPACE/coverage/$safe.out") >> /tmp/cov-func.txt
(cd "$mod" && go tool cover -func="$GITHUB_WORKSPACE/coverage/$safe.out") >> "$COV_FUNC"
done <<< "$MODULES"

{
Expand All @@ -290,7 +291,7 @@ jobs:
echo "| ${complexity} | \`${func}\` | \`${location}\` | ? parse |"
continue
fi
if pct=$(grep -F "${file_line}:" /tmp/cov-func.txt | head -1 | awk 'NF{print $NF}') && [ -n "${pct}" ]; then
if pct=$(grep -F "${file_line}:" "$COV_FUNC" | head -1 | awk 'NF{print $NF}') && [ -n "${pct}" ]; then
case "${pct}" in
0.0%) attended="✗ 0.0%" ;;
*) attended="✓ ${pct}" ;;
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Fix `go-ci.yaml`'s `Augment coverage report with cyclomatic complexity` step staging per-function coverage output at the fixed path `/tmp/cov-func.txt`. On shared self-hosted runners (e.g. the Hetzner pool) `/tmp` outlives the job and is shared across runner instances, so a leftover file owned by a different runner user fails the step with `permission denied`, and two Go jobs landing on the same host can interleave writes and stamp the wrong per-function coverage into each other's `Attended` column. The staging file now lives under `$RUNNER_TEMP`, which is private to the runner instance and wiped between jobs; GitHub-hosted consumers see no change. Closes out the self-hosted-runner hardening of this step begun in 2.3.2's sudo removal. (#12)

## [2.3.4] - 2026-07-10

### Fixed
Expand Down