Skip to content

ci: fix mockgen generation time#1337

Merged
apricote merged 2 commits intomainfrom
fix-mockgen
Feb 24, 2026
Merged

ci: fix mockgen generation time#1337
apricote merged 2 commits intomainfrom
fix-mockgen

Conversation

@phm07
Copy link
Copy Markdown
Contributor

@phm07 phm07 commented Feb 20, 2026

Generating all mocks in one command instead of one command for each interface reduces the total time for go generate ./... from 20.50s to 3.16s (on my system), -> ~85% improvement

@phm07 phm07 self-assigned this Feb 20, 2026
@phm07 phm07 requested a review from a team as a code owner February 20, 2026 10:46
@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.43%. Comparing base (7756f5d) to head (529964b).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1337   +/-   ##
=======================================
  Coverage   72.43%   72.43%           
=======================================
  Files         301      301           
  Lines       11005    11005           
=======================================
  Hits         7972     7972           
  Misses       2144     2144           
  Partials      889      889           
Flag Coverage Δ
e2e 51.49% <ø> (ø)
unit 67.45% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread internal/hcapi2/mock/generate_mocks.sh Outdated
@apricote apricote merged commit 9e586e1 into main Feb 24, 2026
7 checks passed
@apricote apricote deleted the fix-mockgen branch February 24, 2026 15:27
@apricote
Copy link
Copy Markdown
Member

The ci/generate job was reduced from 1m17s to 42s, so 45% quicker. I assume this is less than your local test because the setup time for the environment is constant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants