From df9d8244cedb00e0f0bc9aa968942225dbf16743 Mon Sep 17 00:00:00 2001 From: Jan Richter Date: Wed, 9 Oct 2024 14:02:56 +0200 Subject: [PATCH] Coverage report with codecov instead of codeclimate This is an update for avocado coverage workflow. It changes the coverage reporting tool from codeclimate to codecov since the codecov hasn't been reliable for some time. Reference: #6035 Signed-off-by: Jan Richter --- .github/workflows/push_ci.yml | 24 ++++++++++-------------- codecov.yml | 12 ++++++++++++ 2 files changed, 22 insertions(+), 14 deletions(-) create mode 100644 codecov.yml diff --git a/.github/workflows/push_ci.yml b/.github/workflows/push_ci.yml index fa6bcd7fe5..957b277047 100644 --- a/.github/workflows/push_ci.yml +++ b/.github/workflows/push_ci.yml @@ -78,8 +78,6 @@ jobs: strategy: matrix: python-version: [3.11] - env: - CC_TEST_REPORTER_ID: "387887b88a76f31c2c376219fc749689ea5975c8fe7fcd9609f1dcc139e053a6" steps: - run: echo "Job triggered by a ${{ github.event_name }} event on branch is ${{ github.ref }} in repository is ${{ github.repository }}, runner on ${{ runner.os }}" @@ -90,16 +88,14 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Install - run: | - pip install -r requirements-dev.txt - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter - chmod +x ./cc-test-reporter - - name: Run pre script - run: ./cc-test-reporter before-build + run: pip install -r requirements-dev.txt + - name: Avocado build + run: python setup.py develop --user - name: Run script - run: | - python setup.py develop --user - ./selftests/run_coverage - - name: Run post script - run: ./cc-test-reporter after-build --debug - - run: echo "🥑 This job's status is ${{ job.status }}." + run: ./selftests/run_coverage + - name: Push results to codecov + uses: codecov/codecov-action@v4 + with: + files: ./coverage1.xml + token: ${{ secrets.CODECOV_TOKEN }} + - run: echo "🥑 This job's status is ${{ job.status }}." diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000000..00b92cd5f1 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,12 @@ +coverage: + status: + project: + default: + informational: true + patch: + default: + informational: true + + +# When modifying this file, please validate using +# curl -X POST --data-binary @codecov.yml https://codecov.io/validate