Skip to content

Commit

Permalink
Try codecov flags
Browse files Browse the repository at this point in the history
  • Loading branch information
mwouts committed Nov 23, 2023
1 parent 12b2201 commit 6e10678
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 27 deletions.
24 changes: 18 additions & 6 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,34 @@
codecov:
notify:
after_n_builds: 11
after_n_builds: 15

comment:
after_n_builds: 11
after_n_builds: 15

coverage:
status:
project:
tests:
paths:
- "tests/"
target: 100%
source:
paths:
- "src/jupytext/"
target: 97%
threshold: 0.002
tests:
paths:
- "tests/"
target: 100%
unit-tests:
flags:
- unit
functional-tests:
flags:
- functional
integration-tests:
flags:
- integration
external-tests:
flags:
- external
patch:
default:
target: 80% # new contributions should have a coverage at least equal to target
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ jobs:
needs: [codeql]
uses: ./.github/workflows/step_tests-pip.yml

test_categories:
test-unit-functional-integration:
needs: [codeql]
uses: ./.github/workflows/step_test_classification.yml
uses: ./.github/workflows/step_test_unit_functional.yml

test-conda:
needs: [codeql]
Expand All @@ -60,7 +60,7 @@ jobs:
upload: ${{ inputs.upload-build-artifacts || false }}

pass:
needs: [pre-commit, codeql, test-pip, test-conda, test-ui, build]
needs: [pre-commit, codeql, test-unit-functional-integration, test-pip, test-conda, test-ui, build]
runs-on: ubuntu-latest
steps:
- name: Check jobs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
fail-fast: false
matrix:
python-version: [ "3.11" ]
coverage: [unit, functional, integration, external]

steps:
- name: Checkout
Expand All @@ -28,28 +29,17 @@ jobs:
python_version: ${{ matrix.python-version }}

- name: Install from source
run: python -m pip install -e '.[test-cov]' markdown-it-py~=3.0

- name: Run the unit tests
run: pytest tests/unit --cov=src/jupytext --cov-report=xml

- name: Run the functional tests
run: pytest tests/functional --cov=src/jupytext --cov-report=xml

- name: Install the integration test dependencies
run: python -m pip install -e '.[test-integration]'
run: HATCH_BUILD_HOOKS_ENABLE=false python -m pip install -e '.[test-cov,test-${{ matrix.coverage }}]' markdown-it-py~=3.0

- name: Install a Jupyter Kernel
run: python -m ipykernel install --name python_kernel --user

- name: Run the integration tests
run: pytest tests/integration --cov=src/jupytext --cov-report=xml

- name: Install the external test dependencies
run: python -m pip install -e '.[test-external]'

- name: Run the external tests
run: pytest tests/external --cov=src/jupytext --cov-report=xml
- name: Run the tests
run: pytest tests/${{ matrix.coverage }} --cov=./

- name: Upload the coverage
uses: codecov/codecov-action@v3
with:
flags: ${{ matrix.coverage }}
fail_ci_if_error: true
verbose: true

0 comments on commit 6e10678

Please sign in to comment.