From 9e31e1d198bb6076e326d3ca6db61ffeaeb2dd1b Mon Sep 17 00:00:00 2001 From: Cristian Le Date: Mon, 4 Dec 2023 16:45:31 +0100 Subject: [PATCH] Reconfigure codecov Signed-off-by: Cristian Le --- .github/codecov.yml | 5 +---- .github/workflows/ci.yml | 6 ++++++ .github/workflows/step_coverage.yml | 5 +++++ .github/workflows/step_tests-conda.yml | 10 ++++++---- .github/workflows/step_tests-pip.yml | 5 +++++ 5 files changed, 23 insertions(+), 8 deletions(-) diff --git a/.github/codecov.yml b/.github/codecov.yml index 9dc3686b..897013a1 100644 --- a/.github/codecov.yml +++ b/.github/codecov.yml @@ -1,9 +1,6 @@ codecov: notify: - after_n_builds: 16 - -comment: - after_n_builds: 16 + wait_for_ci: true coverage: status: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 54837cd8..6ed5b905 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,14 +39,20 @@ jobs: test-pip: needs: [ pre-commit ] uses: ./.github/workflows/step_tests-pip.yml + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} coverage: needs: [ test-pip ] uses: ./.github/workflows/step_coverage.yml + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} test-conda: needs: [ test-pip ] uses: ./.github/workflows/step_tests-conda.yml + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} test-ui: needs: [ test-pip ] diff --git a/.github/workflows/step_coverage.yml b/.github/workflows/step_coverage.yml index c97d6bc6..f6aeea59 100644 --- a/.github/workflows/step_coverage.yml +++ b/.github/workflows/step_coverage.yml @@ -3,6 +3,10 @@ run-name: Check coverage on: workflow_call: + secrets: + CODECOV_TOKEN: + description: Codecov token + required: false permissions: contents: read @@ -39,6 +43,7 @@ jobs: - name: Upload the coverage uses: codecov/codecov-action@v3 with: + token: ${{ secrets.CODECOV_TOKEN }} flags: ${{ matrix.coverage }} fail_ci_if_error: true verbose: true diff --git a/.github/workflows/step_tests-conda.yml b/.github/workflows/step_tests-conda.yml index b7a137bf..00b3c637 100644 --- a/.github/workflows/step_tests-conda.yml +++ b/.github/workflows/step_tests-conda.yml @@ -3,6 +3,10 @@ run-name: Run Conda tests for different OS on: workflow_call: + secrets: + CODECOV_TOKEN: + description: Codecov token + required: false permissions: contents: read @@ -57,13 +61,11 @@ jobs: python -m jupyterlab.browser_check - name: Test with pytest - # We use an explicit coverage file otherwise the - # codecov action below does not find it - run: pytest --cov . --cov-report xml:coverage.xml + run: pytest --cov - name: Upload coverage uses: codecov/codecov-action@v3 with: + token: ${{ secrets.CODECOV_TOKEN }} fail_ci_if_error: true verbose: true - files: coverage.xml diff --git a/.github/workflows/step_tests-pip.yml b/.github/workflows/step_tests-pip.yml index 595db72c..a776f107 100644 --- a/.github/workflows/step_tests-pip.yml +++ b/.github/workflows/step_tests-pip.yml @@ -3,6 +3,10 @@ run-name: Run main tests using Pip on: workflow_call: + secrets: + CODECOV_TOKEN: + description: Codecov token + required: false permissions: contents: read @@ -84,5 +88,6 @@ jobs: - name: Upload coverage uses: codecov/codecov-action@v3 with: + token: ${{ secrets.CODECOV_TOKEN }} fail_ci_if_error: true verbose: true