Added GitHub Actions CI for Backend Build and Testing #38
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.
This PR adds a GitHub Actions workflow (
backend-ci.yml
) to automate the backend CI process. The workflow ensures that every code change meets quality standards by running tests, checking for linting issues, and verifying the build process before merging intomain
.Why is this needed?
golangci-lint
) ensures best practices and prevents technical debt.Workflow Overview
This CI workflow runs on
push
andpull_request
events for themain
branch. It performs the following checks:Dependency Management
go mod tidy
andgo mod download
to ensure all dependencies are correctly installed and updated.Unit Testing
go test -v ./...
to run all test cases across the backend, ensuring functionality is intact.Build Verification
cmd/server/main.go
) to verify there are no compilation errors.Linting
golangci-lint
and runs it to enforce coding standards and detect potential issues.This CI pipeline helps maintain a stable, clean, and well-tested backend, improving overall project maintainability and developer experience.