Repository navigation
ci: extract unit and integration test steps into composite actions - #3522
Conversation
Moves the test step logic from pr-tests.yml and integration_tests.yml into two composite actions (.github/actions/unit-tests and .github/actions/integration-tests) so that other workflows can run the same steps. The workflows keep the matrices, sharding strategy, and Codecov/artifact uploads. Behavior changes: - The integration-tests action starts the databases itself (first step, so the pulls still overlap with the package builds). - The integration-tests action takes test-shard, tests-only, and test-parallelism as inputs instead of workflow-level env.
PR SummaryLow Risk Overview Reviewed by Cursor Bugbot for commit a92fbdf. Bugbot is set up for automated code reviews on this repo. Configure here. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
LGTM — clean, verbatim extraction of existing CI steps into reusable composite actions.
Extended reasoning...
Overview
This PR refactors .github/workflows/pr-tests.yml and .github/workflows/integration_tests.yml by extracting their inline step sequences into two new composite actions, .github/actions/unit-tests and .github/actions/integration-tests. The workflows retain the matrices, sharding, and Codecov/artifact upload steps; the actions own the mechanical work (host setup, test execution, data-race checks). I diffed the moved blocks against the new action files and confirmed the step bodies, env vars, and shell commands are unchanged — this is a verbatim move, not a rewrite. The new orchestrator-make-path input on the integration-tests action is unused by both call sites in this PR (default value only), so it introduces no behavior change today; it's scaffolding for a future caller.
Security risks
None. This is CI-only, no production code paths, and secrets handling (CODECOV_TOKEN, test-only fake credentials in start-services) is passed through unchanged via existing secret/input mechanisms.
Level of scrutiny
Low-to-moderate is appropriate: this is a CI workflow refactor, not application logic, and the description explicitly claims a verbatim move which I verified against the diff. A regression here would surface immediately and loudly (broken CI on this or the next PR) rather than silently, which lowers the cost of being wrong.
Other factors
The bug-hunting system found no issues, and the two candidate issues it investigated (orchestrator-make-path being ignored by start-services, and the pgrep verification pattern) were correctly ruled out — that input/step pair is dead code under the current call sites (always default value), so it can't affect this PR's actual behavior. No outstanding review comments exist on the PR.
…3522) # Description This PR moves the test step logic out of the workflows and into two composite actions: - `.github/actions/unit-tests` runs the unit test shard for one package, including the host setup that the package needs. - `.github/actions/integration-tests` runs the integration suite on one configuration, from database startup to the data race check. The workflows (`pr-tests.yml`, `integration_tests.yml`) keep the matrices, the sharding strategy, and the Codecov and artifact uploads. With the logic in actions, other workflows can run the same test steps without a copy of them. ## Changes in behavior - The `integration-tests` action starts the databases itself. The action runs this step first, so the image pulls still overlap with the package builds. - The `integration-tests` action takes `test-shard`, `tests-only`, and `test-parallelism` as inputs. Before, the workflow set these values through environment variables. - The `unit-tests` action always writes `coverage.txt` and `junit.xml`. The Codecov upload steps in `pr-tests.yml` are unchanged. ## No changes - The test commands, timeouts, and host setup steps are identical to the previous inline versions. - The matrices, the runners, and the aggregate jobs are unchanged. # Testing - All four YAML files parse. - The refactor moves the steps verbatim; the diff shows the moved blocks.
Description
This PR moves the test step logic out of the workflows and into two composite actions:
.github/actions/unit-testsruns the unit test shard for one package, including the host setup that the package needs..github/actions/integration-testsruns the integration suite on one configuration, from database startup to the data race check.The workflows (
pr-tests.yml,integration_tests.yml) keep the matrices, the sharding strategy, and the Codecov and artifact uploads. With the logic in actions, other workflows can run the same test steps without a copy of them.Changes in behavior
integration-testsaction starts the databases itself. The action runs this step first, so the image pulls still overlap with the package builds.integration-testsaction takestest-shard,tests-only, andtest-parallelismas inputs. Before, the workflow set these values through environment variables.unit-testsaction always writescoverage.txtandjunit.xml. The Codecov upload steps inpr-tests.ymlare unchanged.No changes
Testing