From 9cc6fdb24982429d8eec983411d393633b23ce6f Mon Sep 17 00:00:00 2001 From: William Di Luigi Date: Wed, 27 Aug 2025 19:06:13 +0200 Subject: [PATCH 1/2] Remove token for codecov In v5 it should not be required anymore for public repositories See https://github.com/codecov/codecov-action?tab=readme-ov-file#v5-release --- .github/workflows/main.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1699261dbc..8513fc9d2c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -37,17 +37,15 @@ jobs: token: ${{ secrets.CODECOV_TOKEN }} - name: Upload unit test coverage results to Codecov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 if: ${{ !cancelled() }} with: files: ./codecov/unittests.xml flags: unittests - token: ${{ secrets.CODECOV_TOKEN }} - name: Upload functional test coverage results to Codecov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 if: ${{ !cancelled() }} with: files: ./codecov/functionaltests.xml flags: functionaltests - token: ${{ secrets.CODECOV_TOKEN }} From 1b4f6703ac41a698a5a2f464cf102c78cb7e2e4e Mon Sep 17 00:00:00 2001 From: prandla Date: Sat, 20 Sep 2025 05:52:47 +0300 Subject: [PATCH 2/2] rename codecov xml dir --- .dockerignore | 2 +- .github/workflows/main.yml | 6 +++--- .gitignore | 2 +- docker/_cms-test-internal.sh | 6 +++--- docker/docker-compose.test.yml | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.dockerignore b/.dockerignore index 5b164b71fb..f574ee5d84 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,7 +1,7 @@ .dockerignore Dockerfile .vagrant/ -codecov/ +codecov-results/ .dev/ .venv/ .git/ diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8513fc9d2c..b40928595a 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,7 +32,7 @@ jobs: if: ${{ !cancelled() }} uses: codecov/test-results-action@v1 with: - files: ./codecov/junit.xml + files: ./codecov-results/junit.xml flags: unittests token: ${{ secrets.CODECOV_TOKEN }} @@ -40,12 +40,12 @@ jobs: uses: codecov/codecov-action@v5 if: ${{ !cancelled() }} with: - files: ./codecov/unittests.xml + files: ./codecov-results/unittests.xml flags: unittests - name: Upload functional test coverage results to Codecov uses: codecov/codecov-action@v5 if: ${{ !cancelled() }} with: - files: ./codecov/functionaltests.xml + files: ./codecov-results/functionaltests.xml flags: functionaltests diff --git a/.gitignore b/.gitignore index 436dd0ad04..8db56f9fc1 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,6 @@ cache/ lib/ log/ .vagrant/ -codecov/ +codecov-results/ .dev/ test_logs/ diff --git a/docker/_cms-test-internal.sh b/docker/_cms-test-internal.sh index 6608e5ef47..aa508743a0 100755 --- a/docker/_cms-test-internal.sh +++ b/docker/_cms-test-internal.sh @@ -1,19 +1,19 @@ #!/usr/bin/env bash -sudo chown cmsuser:cmsuser ./codecov +sudo chown cmsuser:cmsuser ./codecov-results dropdb --if-exists --host=testdb --username=postgres cmsdbfortesting createdb --host=testdb --username=postgres cmsdbfortesting cmsInitDB -pytest --cov . --cov-report xml:codecov/unittests.xml --junitxml=codecov/junit.xml -o junit_family=legacy +pytest --cov . --cov-report xml:codecov-results/unittests.xml --junitxml=codecov-results/junit.xml -o junit_family=legacy UNIT=$? dropdb --host=testdb --username=postgres cmsdbfortesting createdb --host=testdb --username=postgres cmsdbfortesting cmsInitDB -cmsRunFunctionalTests -v --coverage codecov/functionaltests.xml +cmsRunFunctionalTests -v --coverage codecov-results/functionaltests.xml FUNC=$? # This check is needed because otherwise failing unit tests aren't reported in diff --git a/docker/docker-compose.test.yml b/docker/docker-compose.test.yml index 72048c2410..e8d31bca48 100644 --- a/docker/docker-compose.test.yml +++ b/docker/docker-compose.test.yml @@ -15,7 +15,7 @@ services: # - https://github.com/actions/runner/issues/241 PYTEST_ADDOPTS: --color=yes volumes: - - "../codecov:/home/cmsuser/src/codecov" + - "../codecov-results:/home/cmsuser/src/codecov-results" privileged: true cgroup: host command: wait-for-it testdb:5432 -- docker/_cms-test-internal.sh