bot icon indicating copy to clipboard operation
bot copied to clipboard

Split CI pipeline into separate stages: lint, test, analyze, publish

Open steindvart opened this issue 4 months ago • 0 comments

Problem

Right now the GitHub Actions pipeline runs all checks in a single job. This means every check runs sequentially in one stage and we lose clarity and flexibility. It also makes it harder to:

  • Run fast checks in parallel
  • Fail early on linting or analysis problems
  • Reuse or cache steps like Go setup or module caching across related jobs
  • Make the publish step depend clearly on successful tests only

Proposal

  1. Make container-based jobs to avoid "Install Go" step.
  2. Split the pipeline into these jobs:
    • lint - run linters (golangci-lint)
    • analyze - run static code analyzers (for example gocyclo, staticcheck)
    • test - run unit tests and produce coverage
    • publish - publish results (codecov, etc.)

Design notes:

  • test should depend on lint and analyze.
  • publish should run only after test succeeds.

Arguments

  • Faster feedback: lint and analysis can run in parallel and fail early.
  • Clearer pipeline: each job has a single responsibility and easier to read.
  • Easier to maintain: adding or removing checks is simpler.
  • Safer publishing: publishing steps run only after tests pass.

steindvart avatar Oct 29 '25 06:10 steindvart