Skip to content

Commit

Permalink
Reconfigure codecov
Browse files Browse the repository at this point in the history
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
  • Loading branch information
LecrisUT committed Dec 5, 2023
1 parent 9416e98 commit 9e31e1d
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 8 deletions.
5 changes: 1 addition & 4 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
codecov:
notify:
after_n_builds: 16

comment:
after_n_builds: 16
wait_for_ci: true

coverage:
status:
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/step_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ run-name: Check coverage

on:
workflow_call:
secrets:
CODECOV_TOKEN:
description: Codecov token
required: false

permissions:
contents: read
Expand Down Expand Up @@ -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
10 changes: 6 additions & 4 deletions .github/workflows/step_tests-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
5 changes: 5 additions & 0 deletions .github/workflows/step_tests-pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

0 comments on commit 9e31e1d

Please sign in to comment.