From c62d2189baaf6f055168847ff1da963ea40de629 Mon Sep 17 00:00:00 2001 From: Patryk Targowicz Date: Mon, 4 May 2026 23:36:23 +0200 Subject: [PATCH 1/4] ci: Replace Coveralls with Codecov Signed-off-by: Patryk Targowicz Ticket: QA-1574 Signed-off-by: Patryk Targowicz --- .gitlab-ci.yml | 36 +++++++++++++++--------------------- codecov.yml | 8 ++++++++ 2 files changed, 23 insertions(+), 21 deletions(-) create mode 100644 codecov.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 67cf10e3..6cdc9beb 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -255,32 +255,26 @@ test:install:brew: publish:acceptance: stage: publish - image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/golang:1.20-alpine3.17 - allow_failure: true # QA-925 - Coveralls servers are unreliable. + image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/golang:1.24-alpine + allow_failure: true dependencies: - test_acceptance:run before_script: - !reference [.qa-common-network-go-retry, before_script] - - go tool covdata textfmt -i tests/acceptance/coverage -o coverage.txt - - go install github.com/mattn/goveralls@latest - # Coveralls env variables: - # According to https://docs.coveralls.io/supported-ci-services - # we should set CI_NAME, CI_BUILD_NUMBER, etc. But according - # to goveralls source code (https://github.com/mattn/goveralls) - # many of these are not supported. Set CI_BRANCH, CI_PR_NUMBER, - # and pass few others as command line arguments. - # See also https://docs.coveralls.io/api-reference - - export CI_BRANCH=${CI_COMMIT_BRANCH} - - export CI_PR_NUMBER=${CI_COMMIT_BRANCH#pr_} script: - - goveralls - -repotoken ${COVERALLS_TOKEN} - -service gitlab-ci - -jobid $CI_PIPELINE_ID - -covermode set - -flagname acceptance - -parallel - -coverprofile coverage.txt + - go tool covdata textfmt -i tests/acceptance/coverage -o coverage.txt + - wget -q https://cli.codecov.io/latest/alpine/codecov + - wget -q https://cli.codecov.io/latest/alpine/codecov.SHA256SUM + - sha256sum -c codecov.SHA256SUM + - chmod +x codecov + - ./codecov upload-process + --fail-on-error + --git-service github + --slug mendersoftware/${CI_PROJECT_NAME} + --sha ${CI_COMMIT_SHA} + --pr $(echo "${CI_COMMIT_BRANCH}" | sed 's/^pr_//') + --file coverage.txt + --flag acceptance publish:s3: stage: publish diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 00000000..61d446d3 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,8 @@ +coverage: + status: + project: + default: + target: auto + patch: + default: + target: auto From 95774c403b12e192be6164e31ea4742974d2b0b6 Mon Sep 17 00:00:00 2001 From: Patryk Targowicz Date: Wed, 13 May 2026 03:18:28 +0200 Subject: [PATCH 2/4] ci(coverage): pin mendertesting v2 unit test template to codecov fix branch Signed-off-by: Patryk Targowicz Ticket: QA-1574 Signed-off-by: Patryk Targowicz --- .gitlab-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6cdc9beb..52e9805d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -7,6 +7,7 @@ include: file: '.gitlab-ci-check-golang-lint.yml' - project: 'Northern.tech/Mender/mendertesting' file: '.gitlab-ci-check-golang-unittests-v2.yml' + ref: 'fix/QA-1574-codecov-pass-sha' - component: gitlab.com/Northern.tech/Mender/mendertesting/commit-lint@master - project: 'Northern.tech/Mender/mendertesting' file: '.gitlab-ci-check-license.yml' From 284a7aceb32acbc122a2541749e586981e55bf96 Mon Sep 17 00:00:00 2001 From: Patryk Targowicz Date: Wed, 13 May 2026 03:25:41 +0200 Subject: [PATCH 3/4] ci(coverage): switch to new codecov CLI coverage template Replace the old unittests-v2 template with the new -codecov variant that uses the updated Codecov CLI uploader. Signed-off-by: Patryk Targowicz Ticket: QA-1574 Signed-off-by: Patryk Targowicz --- .gitlab-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 52e9805d..92e75a51 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,8 +6,8 @@ include: - project: 'Northern.tech/Mender/mendertesting' file: '.gitlab-ci-check-golang-lint.yml' - project: 'Northern.tech/Mender/mendertesting' - file: '.gitlab-ci-check-golang-unittests-v2.yml' - ref: 'fix/QA-1574-codecov-pass-sha' + file: '.gitlab-ci-check-golang-unittests-v2-codecov.yml' + ref: 'feat/QA-1574-new-codecov-templates' - component: gitlab.com/Northern.tech/Mender/mendertesting/commit-lint@master - project: 'Northern.tech/Mender/mendertesting' file: '.gitlab-ci-check-license.yml' From 052255427bcf7143501b80cd5bd63b473d2e3656 Mon Sep 17 00:00:00 2001 From: Patryk Targowicz Date: Wed, 13 May 2026 10:27:05 +0200 Subject: [PATCH 4/4] ci(coverage): use codecov CI/CD component from mendertesting Signed-off-by: Patryk Targowicz Ticket: QA-1574 Signed-off-by: Patryk Targowicz --- .gitlab-ci.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 92e75a51..be9be18c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -5,9 +5,7 @@ include: - qa-common/retry.yml - project: 'Northern.tech/Mender/mendertesting' file: '.gitlab-ci-check-golang-lint.yml' - - project: 'Northern.tech/Mender/mendertesting' - file: '.gitlab-ci-check-golang-unittests-v2-codecov.yml' - ref: 'feat/QA-1574-new-codecov-templates' + - component: gitlab.com/Northern.tech/Mender/mendertesting/golang-unittests-v2-codecov@feat/QA-1574-new-codecov-templates - component: gitlab.com/Northern.tech/Mender/mendertesting/commit-lint@master - project: 'Northern.tech/Mender/mendertesting' file: '.gitlab-ci-check-license.yml'