-
Notifications
You must be signed in to change notification settings - Fork 450
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run CI tests in parallel #25271
Run CI tests in parallel #25271
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #25271 +/- ##
==========================================
- Coverage 63.85% 63.83% -0.03%
==========================================
Files 1616 1616
Lines 153836 153851 +15
Branches 3976 3976
==========================================
- Hits 98230 98207 -23
- Misses 47791 47838 +47
+ Partials 7815 7806 -9
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Left a nit comment around ./
prefix in the paths but if this works, then g2g.
@lucasmrod I'm running a new test right now with all of |
It's about the same, the longest test is still the integration test. In the future we could run the Enterprise and MDM integration tests as their own unit to speed it up |
PKG_TO_TEST := "" # default to empty string; can be overridden on command line. | ||
go_test_pkg_to_test := $(addprefix ./,$(PKG_TO_TEST)) # set paths for packages to test | ||
dlv_test_pkg_to_test := $(addprefix github.com/fleetdm/fleet/v4/,$(PKG_TO_TEST)) # set URIs for packages to debug | ||
|
||
DEFAULT_PKG_TO_TEST := ./cmd/... ./ee/... ./orbit/pkg/... ./orbit/cmd/orbit ./pkg/... ./server/... ./tools/... | ||
ifeq ($(CI_TEST_PKG), main) | ||
CI_PKG_TO_TEST=$(shell go list ${DEFAULT_PKG_TO_TEST} | grep -v "server/datastore/mysql" | grep -v "cmd/fleetctl" | grep -v "server/vulnerabilities" | sed -e 's|github.com/fleetdm/fleet/v4/||g') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think there's a limit to the # of packages you can specify for go test
, so as long as it fits in one shell command we should be 👍
I think if we split up the different integration tests into their own units we could save time as well, but I also don't know how far down that rabbit hole I want to go due to potential github action costs. If we could somehow do the schema dump and mock generation in their own action and then reuse it in the other actions, we could probably save ~1.5m per test. Maybe something to look into in another ticket. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
#21774
Improves run time by about 30%.
Things have been arranged in such a way that splitting modules out further will be trivial in the future, such as breaking the different integration test suited into their own units.