Skip to content

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

@steindvart

Description

@steindvart

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions