Skip to content

feat: add unit test and coverage check workflows#232

Merged
xgerman merged 2 commits intodocumentdb:mainfrom
hossain-rayhan:rayhan/enforce-unit-tests
Feb 13, 2026
Merged

feat: add unit test and coverage check workflows#232
xgerman merged 2 commits intodocumentdb:mainfrom
hossain-rayhan:rayhan/enforce-unit-tests

Conversation

@hossain-rayhan
Copy link
Collaborator

  • Add test-unit.yml to run Go unit tests on PRs and pushes to main
  • Add test-unit-coverage.yml to enforce 90% coverage on new lines
  • Both workflows only trigger on Go code changes in operator/src/
  • Skip docs, shell scripts, and non-Go files

Copilot AI review requested due to automatic review settings February 5, 2026 20:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds two new GitHub Actions workflows to automate unit testing and coverage enforcement for the DocumentDB Kubernetes Operator. The workflows integrate seamlessly with the existing test infrastructure by triggering on Go code changes in the operator/src directory.

Changes:

  • Added test-unit.yml to run unit tests with race detection on all PRs and pushes to main
  • Added test-unit-coverage.yml to enforce 90% coverage threshold on newly added lines in PRs

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/test-unit.yml Runs Go unit tests with race detection, go vet, and test summary on PR and main branch changes
.github/workflows/test-unit-coverage.yml Enforces 90% coverage on new code using go-patch-cover-action with diff analysis

Rayhan Hossain added 2 commits February 13, 2026 10:38
- Add test-unit.yml to run Go unit tests on PRs and pushes to main
- Add test-unit-coverage.yml to enforce 90% coverage on new lines
- Both workflows only trigger on Go code changes in operator/src/
- Skip docs, shell scripts, and non-Go files
Signed-off-by: Rayhan Hossain <rhossain@microsoft.com>
@hossain-rayhan hossain-rayhan force-pushed the rayhan/enforce-unit-tests branch from 0c3bb65 to fcaed4d Compare February 13, 2026 18:52
@xgerman xgerman merged commit a28dfef into documentdb:main Feb 13, 2026
44 checks passed
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.

3 participants