Skip to content

Commit d65b940

Browse files
author
Race Tester
committed
ci: upload deadcode report and add hook bench target
1 parent a5e8d0c commit d65b940

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,13 @@ jobs:
161161
go install golang.org/x/tools/cmd/deadcode@latest
162162
deadcode -test ./... 2>&1 | tee deadcode.txt
163163
echo "deadcode reported $(grep -c 'unreachable func' deadcode.txt || echo 0) unreachable funcs (advisory)"
164+
- name: upload deadcode report
165+
uses: actions/upload-artifact@v4
166+
if: always()
167+
with:
168+
name: deadcode-report
169+
path: deadcode.txt
170+
if-no-files-found: ignore
164171

165172
# -------------------------------------------------------------------------
166173
# Duplication detection — jscpd.

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ cover: ## Generate a coverage report (coverage.out + coverage.html).
6666
bench: ## Run benchmarks.
6767
go test ./... -bench=. -benchmem -count=3 -timeout=300s
6868

69+
bench-hooks: ## Run hook latency benchmarks (integration-tagged; spawns real git repos).
70+
go test -tags=integration ./cli/integration_test/ -run='^$$' -bench=BenchmarkHook -benchmem -timeout=600s
71+
6972
# ---------------------------------------------------------------------------
7073
# Quality gates.
7174
# ---------------------------------------------------------------------------

0 commit comments

Comments
 (0)