Skip to content

Setup GitHub Actions for Continuous Testing #5

@piraz

Description

@piraz

Establish a GitHub Actions workflow to automatically run unit tests and verify code quality on every push and pull request. This ensures that the minimum Go version (1.23) is respected and that new changes do not break existing logic in the cache, protocol, and cli packages.

Tasks

  • Create makefile with test
  • Create workflow.
  • Configure the workflow to trigger on push to master and all pull_request events.
  • Define a job matrix for Go versions 1.23, 1.24, and 1.25.
  • Implement steps for:
    • Checking out the repository.
    • Setting up the Go environment.
    • Running go mod download.
    • Running all tests using go test -v ./....
    • Verifying code formatting with gofmt.

Acceptance Criteria

  • The CI pipeline successfully runs on a new Pull Request.
  • The build fails if any unit test in internal/cache or other packages fails.
  • The build fails if the Go version is lower than 1.23.
  • Workflow execution time is optimized by using Go build caching.

Metadata

Metadata

Assignees

Labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions