Skip to content

feat(coverage): add codecov CLI coverage templates#485

Open
p-targowicz wants to merge 2 commits into
masterfrom
feat/QA-1574-new-codecov-templates
Open

feat(coverage): add codecov CLI coverage templates#485
p-targowicz wants to merge 2 commits into
masterfrom
feat/QA-1574-new-codecov-templates

Conversation

@p-targowicz
Copy link
Copy Markdown
Contributor

Summary

Adds three new GitLab CI templates using the updated Codecov CLI uploader:

  • .gitlab-ci-check-golang-unittests-codecov.yml — unit tests with MongoDB (replaces the old unittests template for repos like mender-gateway, mender-connect)
  • .gitlab-ci-check-golang-unittests-v2-codecov.yml — unit tests without MongoDB (replaces the v2 template for repos like mender-cli)
  • .gitlab-ci-check-docker-acceptance-codecov.yml — Docker-based acceptance tests (replaces the docker-acceptance template for repos like mender-gateway)

Key improvements over the existing templates:

  • Uses cli.codecov.io instead of the deprecated uploader.codecov.io
  • Uses upload-process subcommand with --sha ${CI_COMMIT_SHA} for correct commit association
  • Verifies the binary SHA256 checksum before execution
  • Uses rules: syntax instead of deprecated except:

Ticket: QA-1574

New templates using the updated Codecov CLI (upload-process) replacing
the legacy uploader. Key improvements over the existing templates:
- Uses cli.codecov.io instead of the deprecated uploader.codecov.io
- Passes --sha explicitly to ensure correct commit association
- Verifies the binary checksum before execution
- Uses rules: syntax instead of deprecated except:

Signed-off-by: Patryk Targowicz <patryk.targowicz@northern.tech>
Ticket: QA-1574
Signed-off-by: Patryk Targowicz <patryk.targowicz@northern.tech>
Copy link
Copy Markdown
Contributor

@danielskinstad danielskinstad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A general note without looking at the actual files: I think these should be CI/CD components.
https://about.gitlab.com/blog/refactoring-a-ci-cd-template-to-a-ci-cd-component/

Replaces the three new -codecov template files with proper GitLab CI/CD
components under templates/. Components expose configurable inputs for
Go version, MongoDB version, stages, and runner tags.

- templates/golang-unittests-codecov.yml
- templates/golang-unittests-v2-codecov.yml
- templates/docker-acceptance-codecov.yml

All publish jobs use the updated Codecov CLI (upload-process) with
explicit --sha, SHA256 binary verification, and --git-service github.

Signed-off-by: Patryk Targowicz <patryk.targowicz@northern.tech>
Ticket: QA-1574
Signed-off-by: Patryk Targowicz <patryk.targowicz@northern.tech>
@p-targowicz p-targowicz force-pushed the feat/QA-1574-new-codecov-templates branch from fc731fa to 2b1d281 Compare May 13, 2026 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants