ci: split ubuntu and windows tests by suite#2002
Conversation
📝 WalkthroughWalkthroughThe CI workflow is refactored to split Go tests into a matrix of suite jobs (unit and integration), with fail-fast disabled. A new step resolves test packages dynamically, and test execution is updated to run only resolved packages instead of all packages. Codecov uploads are enhanced with suite-specific metadata. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
.github/workflows/ci.yaml (1)
158-163: Derive the exclude prefix fromgo.modto maintain consistency.The unit-suite selector hardcodes
github.com/dagucloud/dagu, which appears in two places (lines 158 and 285). If the module path ingo.modchanges, the grep pattern could become stale and silently includeinternal/intgpackages in the unit suite. Extract the module path dynamically usinggo list -mto keep the suite separation self-consistent.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/ci.yaml around lines 158 - 163, Replace the hardcoded module prefix used in the unit-suite package exclusion (currently in the packages_cmd that runs go list ./... | grep -Ev '^github.com/dagucloud/dagu/internal/intg(/|$)') with a dynamically derived module path from go list -m so the grep pattern stays correct if go.mod changes; update both occurrences where the literal prefix appears (the packages_cmd lines and any other suite selector using that string) to first compute the module path via go list -m and then use that variable in the grep -Ev pattern, ensuring suite: intg and the internal/intg package selector remain correctly separated.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/ci.yaml:
- Around line 158-159: The grep in the packages_cmd pipeline can cause the step
to fail when there are no matches (breaking the subsequent [[ -z "${packages}"
]] guard); change the pipeline to ensure grep returns success on empty output
(e.g. append a fallback so the command exits 0) for the packages_cmd and the
other similar commands mentioned (the other package-filtering commands around
the CI file), so the empty-packages check using [[ -z "${packages}" ]] can run
as intended.
---
Nitpick comments:
In @.github/workflows/ci.yaml:
- Around line 158-163: Replace the hardcoded module prefix used in the
unit-suite package exclusion (currently in the packages_cmd that runs go list
./... | grep -Ev '^github.com/dagucloud/dagu/internal/intg(/|$)') with a
dynamically derived module path from go list -m so the grep pattern stays
correct if go.mod changes; update both occurrences where the literal prefix
appears (the packages_cmd lines and any other suite selector using that string)
to first compute the module path via go list -m and then use that variable in
the grep -Ev pattern, ensuring suite: intg and the internal/intg package
selector remain correctly separated.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 8cc70622-de2c-459f-8ec4-e16b7d90c11b
📒 Files selected for processing (1)
.github/workflows/ci.yaml
Summary
ubuntu-latestGo test job into parallel(1/2)unit and(2/2)internal/intg/...runswindows-latestGo test job the same way so both suites run independently on that runner tooTesting
go run github.com/rhysd/actionlint/cmd/actionlint@latestinternal/intgpackages./internal/intg/...packagesset -e -o pipefailgo test ./internal/intg -run TestParallelExecution_AbortStopsPendingLaunches -count=5go test ./internal/intg/distr -run TestExecution_Artifacts -count=1go test ./internal/intg/distr -run TestDistributedRun_DelayedAfterAck_DoesNotExecuteAfterStaleCleanup -count=1CIrun24491182777