Skip to content

ci: split ubuntu and windows tests by suite#2002

Merged
yottahmd merged 5 commits intomainfrom
ci/split-ubuntu-windows-tests
Apr 16, 2026
Merged

ci: split ubuntu and windows tests by suite#2002
yottahmd merged 5 commits intomainfrom
ci/split-ubuntu-windows-tests

Conversation

@yottahmd
Copy link
Copy Markdown
Collaborator

@yottahmd yottahmd commented Apr 16, 2026

Summary

  • split the ubuntu-latest Go test job into parallel (1/2) unit and (2/2) internal/intg/... runs
  • split the windows-latest Go test job the same way so both suites run independently on that runner too
  • keep Ubuntu coverage uploads per suite so Codecov can aggregate the reports across the split jobs
  • use existing platform-aware integration timeouts for Windows-sensitive parallel abort, distributed artifact waits, and delayed-ack stale cleanup exposed by the split
  • resolve review feedback by deriving the module path in the package resolver and keeping empty-package failures on the explicit guard path

Testing

  • go run github.com/rhysd/actionlint/cmd/actionlint@latest
  • verified unit resolver returns 137 non-internal/intg packages
  • verified integration resolver returns ./internal/intg/... packages
  • verified the empty unit-filter case reaches the explicit guard under set -e -o pipefail
  • go test ./internal/intg -run TestParallelExecution_AbortStopsPendingLaunches -count=5
  • go test ./internal/intg/distr -run TestExecution_Artifacts -count=1
  • go test ./internal/intg/distr -run TestDistributedRun_DelayedAfterAck_DoesNotExecuteAfterStaleCleanup -count=1
  • GitHub Actions CI run 24491182777

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 16, 2026

📝 Walkthrough

Walkthrough

The 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

Cohort / File(s) Summary
CI Workflow Configuration
.github/workflows/ci.yaml
Added matrix strategy for test suites, implemented dynamic test package resolution step, updated test commands to execute only resolved packages, and configured suite-specific Codecov reporting with flags and naming.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the main change: splitting Ubuntu and Windows Go tests by suite (unit and integration).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/split-ubuntu-windows-tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/ci.yaml (1)

158-163: Derive the exclude prefix from go.mod to maintain consistency.

The unit-suite selector hardcodes github.com/dagucloud/dagu, which appears in two places (lines 158 and 285). If the module path in go.mod changes, the grep pattern could become stale and silently include internal/intg packages in the unit suite. Extract the module path dynamically using go list -m to 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

📥 Commits

Reviewing files that changed from the base of the PR and between 45b11e0 and d212393.

📒 Files selected for processing (1)
  • .github/workflows/ci.yaml

Comment thread .github/workflows/ci.yaml Outdated
@yottahmd yottahmd merged commit 2177b91 into main Apr 16, 2026
10 checks passed
@yottahmd yottahmd deleted the ci/split-ubuntu-windows-tests branch April 16, 2026 04:51
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.

1 participant