From b7f9d7f205ba3a3aa0028dd349a95ff266f1630d Mon Sep 17 00:00:00 2001 From: FileMagic Date: Mon, 23 Oct 2023 21:34:56 -0400 Subject: [PATCH 1/6] Set lowest version for codecov-cli --- scripts/ci/submit-codecov-coverage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci/submit-codecov-coverage.sh b/scripts/ci/submit-codecov-coverage.sh index 416e5533ae..273e7c10d9 100755 --- a/scripts/ci/submit-codecov-coverage.sh +++ b/scripts/ci/submit-codecov-coverage.sh @@ -21,7 +21,7 @@ if [[ "${USER}" == "runner" || ${TRAVIS_TEST_RESULT} -eq 0 ]]; then # 1. Install codecov dependencies pip install -U pip pip install coverage - pip install codecov-cli>=0.3.2 + pip install 'codecov-cli>=0.3.2' # 2. Combine coverage report and submit coverage report to codecov.io codecovcli upload-process -t "${CODECOV_TOKEN}" From 84424a96d80189404e01a2ab893233ed32eee0cc Mon Sep 17 00:00:00 2001 From: FileMagic Date: Mon, 23 Oct 2023 21:42:40 -0400 Subject: [PATCH 2/6] Add CODECOV_TOKEN --- .github/workflows/orquesta-integration-tests.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/orquesta-integration-tests.yaml b/.github/workflows/orquesta-integration-tests.yaml index 84913a1cd3..6b4dd3e1ab 100644 --- a/.github/workflows/orquesta-integration-tests.yaml +++ b/.github/workflows/orquesta-integration-tests.yaml @@ -229,6 +229,8 @@ jobs: if: "${{ success() && env.ENABLE_COVERAGE == 'yes' }}" run: | ./scripts/ci/submit-codecov-coverage.sh + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - name: Compress Service Logs Before upload if: ${{ failure() }} run: | From 6e3c8a71a36e0ff53344dd7e1a4c36534636190d Mon Sep 17 00:00:00 2001 From: FileMagic Date: Mon, 23 Oct 2023 21:47:36 -0400 Subject: [PATCH 3/6] Update changelog --- CHANGELOG.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index d9efe84527..36b5f82e86 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -18,7 +18,7 @@ Fixed * Avoid logging sensitive information in debug (fix #5977) -* Fix codecov stackstorm/st2 (https://github.com/StackStorm/st2/issues/6035) +* Fix codecov for intergration and unit tests stackstorm/st2 (#6035 and #6046) Added ~~~~~ From fc92f05460246042ce0e390497b15ccbb03b0e50 Mon Sep 17 00:00:00 2001 From: FileMagic Date: Mon, 23 Oct 2023 21:50:27 -0400 Subject: [PATCH 4/6] Enable code cov at all times for testing --- .github/workflows/orquesta-integration-tests.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/orquesta-integration-tests.yaml b/.github/workflows/orquesta-integration-tests.yaml index 6b4dd3e1ab..86781781b0 100644 --- a/.github/workflows/orquesta-integration-tests.yaml +++ b/.github/workflows/orquesta-integration-tests.yaml @@ -226,7 +226,7 @@ jobs: path: logs/ - name: Codecov # NOTE: We only generate and submit coverage report for master and version branches and only when the build succeeds (default on GitHub Actions, this was not the case on Travis so we had to explicitly check success) - if: "${{ success() && env.ENABLE_COVERAGE == 'yes' }}" + if: "${{ success() }}" run: | ./scripts/ci/submit-codecov-coverage.sh env: From 43cc668c34593158fce239f56226a3aa44168e40 Mon Sep 17 00:00:00 2001 From: FileMagic Date: Mon, 23 Oct 2023 22:13:07 -0400 Subject: [PATCH 5/6] Bump version from 0.3.2 --- scripts/ci/submit-codecov-coverage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/ci/submit-codecov-coverage.sh b/scripts/ci/submit-codecov-coverage.sh index 273e7c10d9..76ab0f362c 100755 --- a/scripts/ci/submit-codecov-coverage.sh +++ b/scripts/ci/submit-codecov-coverage.sh @@ -21,7 +21,7 @@ if [[ "${USER}" == "runner" || ${TRAVIS_TEST_RESULT} -eq 0 ]]; then # 1. Install codecov dependencies pip install -U pip pip install coverage - pip install 'codecov-cli>=0.3.2' + pip install 'codecov-cli>=0.4' # 2. Combine coverage report and submit coverage report to codecov.io codecovcli upload-process -t "${CODECOV_TOKEN}" From 75cf2f49825612c14f3dfad86fa8ab5c8d3bb50b Mon Sep 17 00:00:00 2001 From: FileMagic Date: Mon, 23 Oct 2023 22:30:47 -0400 Subject: [PATCH 6/6] Set codecov uploads for python3.8 for orquesta test --- .github/workflows/orquesta-integration-tests.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/orquesta-integration-tests.yaml b/.github/workflows/orquesta-integration-tests.yaml index 86781781b0..dabfa417f4 100644 --- a/.github/workflows/orquesta-integration-tests.yaml +++ b/.github/workflows/orquesta-integration-tests.yaml @@ -106,7 +106,7 @@ jobs: env: TASK: '${{ matrix.task }}' - + PYTHON_VERSION_SHORT: '${{ matrix.python-version-short }}' NODE_TOTAL: '${{ matrix.nosetests_node_total }}' NODE_INDEX: '${{ matrix.nosetests_node_index }}' @@ -226,7 +226,7 @@ jobs: path: logs/ - name: Codecov # NOTE: We only generate and submit coverage report for master and version branches and only when the build succeeds (default on GitHub Actions, this was not the case on Travis so we had to explicitly check success) - if: "${{ success() }}" + if: "${{ success() && (env.ENABLE_COVERAGE == 'yes') && (env.PYTHON_VERSION_SHORT == '3.8')}}" run: | ./scripts/ci/submit-codecov-coverage.sh env: