vitessio / vt

Apache License 2.0
2 stars 0 forks source link

CI Enhancements #38

Closed systay closed 1 week ago

systay commented 1 week ago

Description

This PR introduces several key improvements to the CI workflow, focusing on better formatting checks, dependency management, and enhanced test result visibility.

Changes:

  1. Code Formatting Enforcement (make pretty):

    • Added a make pretty step to the CI workflow that runs gofumpt and goimports-reviser to ensure Go code is consistently formatted.
    • The CI now fails if code is not properly formatted, ensuring all commits maintain a consistent style.
  2. Go Module Tidy Check:

    • Integrated a go mod tidy check to ensure go.mod and go.sum files are up to date and clean.
    • CI will fail if go mod tidy results in any changes, prompting developers to keep dependencies tidy before merging.
  3. Improved Test Reporting:

    • Replaced the basic make test step with a detailed test run using go test -v, which outputs detailed logs for debugging.
    • Added the dorny/test-reporter GitHub Action to annotate test failures directly in the GitHub UI using the JUnit format, making it easier to view and track failed tests without manually parsing logs.
  4. Linting:

    • Added make lint and a linter configuration.
  5. Pre-commit Git Hook:

    • Adds a git pre-commit hook when you run make install-hooks.