Skip to content

Add CI workflow to run unit tests on PRs#196

Open
bhatnitish wants to merge 6 commits into
ROCm:masterfrom
bhatnitish:ci/unit-tests
Open

Add CI workflow to run unit tests on PRs#196
bhatnitish wants to merge 6 commits into
ROCm:masterfrom
bhatnitish:ci/unit-tests

Conversation

@bhatnitish

Copy link
Copy Markdown
Contributor

Summary

  • Adds a new GitHub Actions workflow (.github/workflows/unit-tests.yml) that runs go test ./... on every pull request targeting master or any release-* branch.
  • Uses actions/setup-go@v5 with the Go version pinned to go.mod to keep CI aligned with the project's declared toolchain.

Test plan

  • Open a PR against master or a release-* branch and confirm the Unit Tests check appears and passes.
  • Introduce a failing test locally and verify the workflow reports a failure.

Comment thread internal/pkg/amdgpu/amdgpu.go
Comment thread internal/pkg/allocator/device.go
The previous commit changed GetAMDGPUs to Warning+return instead of
Fatal when the driver is absent. This broke production behavior where
we want the process to exit immediately on hardware nodes without the
driver. Instead, add a FatalOnDriverUnavailable package variable
(defaults to true) that tests disable via TestMain, keeping production
Fatal behavior intact while letting CI run tests without GPUs.
Add workflow_dispatch trigger to allow manual runs, and a concurrency
group with cancel-in-progress to cancel stale runs when new commits
are pushed to the same PR. Mirrors ROCm/device-config-manager#32.
…n_id change

Commit e8120e3 changed GetDevIdsFromTopology from using unique_id
(hashed numeric strings) to using domain/location_id (PCI addresses),
but the test expectations were not updated to match.
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.

2 participants