diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8445e06fdc..3087324189 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -371,7 +371,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 }}' @@ -478,9 +478,11 @@ jobs: ./scripts/ci/run-nightly-make-task-if-exists.sh "${TASK}" - 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() && (env.ENABLE_COVERAGE == 'yes') && (env.PYTHON_VERSION_SHORT == '3.8')}}" run: | ./scripts/ci/submit-codecov-coverage.sh + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} integration-tests: needs: pre_job @@ -606,7 +608,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 }}' @@ -715,9 +717,11 @@ jobs: script -e -c "make ${TASK}" && exit 0 - 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' && env.TASK == 'ci-integration' }}" + if: "${{ success() && (env.ENABLE_COVERAGE == 'yes') && (env.TASK == 'ci-integration') && (env.PYTHON_VERSION_SHORT == '3.8')}}" run: | ./scripts/ci/submit-codecov-coverage.sh + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - name: Compress Service Logs Before upload if: ${{ failure() && env.TASK == 'ci-integration' }} run: | diff --git a/CHANGELOG.rst b/CHANGELOG.rst index e3d6e797e7..92ca775ac4 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -15,6 +15,8 @@ Fixed * Avoid logging sensitive information in debug (fix #5977) +* Fix codecov stackstorm/st2 (https://github.com/StackStorm/st2/issues/6035) + Added ~~~~~ diff --git a/.codecov.yml b/codecov.yml similarity index 100% rename from .codecov.yml rename to codecov.yml diff --git a/scripts/ci/submit-codecov-coverage.sh b/scripts/ci/submit-codecov-coverage.sh index 3c8e441d3a..416e5533ae 100755 --- a/scripts/ci/submit-codecov-coverage.sh +++ b/scripts/ci/submit-codecov-coverage.sh @@ -19,15 +19,12 @@ # If we're on Travis, then we need to manually check that the build succeeded. if [[ "${USER}" == "runner" || ${TRAVIS_TEST_RESULT} -eq 0 ]]; then # 1. Install codecov dependencies - # NOTE: We need eventlet installed so coverage can be correctly combined. This is needed because we are covering code which utilizes eventlet. - # Without eventlet being available to the coverage command it will fail with "Couldn't trace with concurrency=eventlet, the module isn't installed." - pip install eventlet - # NOTE: codecov only supports coverage==4.5.2 - pip install 'coverage<5.0' - pip install "codecov==2.1.11" + pip install -U pip + pip install coverage + pip install codecov-cli>=0.3.2 - # 2. Combine coverage report and submit coverage report to codecovs.io - codecov --required + # 2. Combine coverage report and submit coverage report to codecov.io + codecovcli upload-process -t "${CODECOV_TOKEN}" exit $? else echo "Build has failed, not submitting coverage" diff --git a/test-requirements.txt b/test-requirements.txt index 56b8b7ac2a..f54d403f31 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -1,5 +1,4 @@ -# NOTE: codecov only supports coverage==4.5.2 -coverage==4.5.2 +coverage pep8==1.7.1 st2flake8==0.1.0 astroid==2.5.6