ci: add change-aware unit test check workflow#833
Open
zyl1121 wants to merge 1 commit into
Open
Conversation
Add a Unit Test Check workflow for pull_request, push, and workflow_dispatch events. The workflow selects component test jobs from changed file paths. Start the matrix with CubeAPI, CubeShim, and network-agent, which can currently run in the shared builder-based GitHub Actions environment. Add root builder-backed test targets and the missing make test entrypoints for CubeAPI and CubeShim. Bump the builder image Go version from 1.24 to 1.25.7 so the shared builder toolchain matches newer Go requirements already declared in the repository. Signed-off-by: zhengyilei <zheng_yilei@qq.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The repository already has a
Build Checkworkflow, but there is no dedicated unit test workflow for PRs.Build checks catch compile and packaging issues, but they do not provide the same signal as running component unit tests. Adding a PR-triggered unit test workflow helps catch regressions earlier and improves PR quality before review and merge.
Running every service test for every small change would be expensive and noisy, so this PR adds a change-aware workflow that reuses the existing builder-based CI pattern.
What Changed
unit-test-check.ymlforpull_request,push, andworkflow_dispatchevents.CubeAPICubeShimnetwork-agent*-testtargets to the rootMakefile.make testentrypoints forCubeAPIandCubeShim.Validation
Local validation:
make -n cubeapi-test cube-api-test shim-test network-agent-testFork workflow validation:
CubeAPI/Makefiletriggered onlyTest CubeAPI.CubeAPI/MakefileandCubeShim/Makefiletriggered onlyTest CubeAPIplusTest CubeShim.Build workflow validation:
Build Checkstill passes after bumping the builder image Go version from 1.24 to 1.25.7.Scope
This first workflow only includes components whose unit tests can currently run in the shared builder-based GitHub Actions environment.
It intentionally leaves other components, SDK tests, integration tests, smoke tests, and e2e tests for follow-up PRs. Some excluded components already reach real test execution but still require component-specific fixture, environment, or test-debt cleanup before they can be safely added to the default PR matrix.
Build Checkremains unchanged as the broad build workflow. The changed-path narrowing introduced here only applies to the newUnit Test Check.