Skip to content

Commit

Permalink
Restore the codecov comments on PRs (#1173)
Browse files Browse the repository at this point in the history
* Test against jupyter-server!=2.11
* Use a default shell in the conda build
* Use an explicit coverage file in the conda build
* Allow coverage fluctuations up to 0.2%
* Remove the experimental entries in the matrix
Because otherwise the commit always get a red cross
  • Loading branch information
mwouts authored Nov 25, 2023
1 parent 923798e commit e1c6d13
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 36 deletions.
8 changes: 6 additions & 2 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,27 @@ coverage:
paths:
- "src/jupytext/"
target: 97%
threshold: 0.002
threshold: 0.2%
tests:
paths:
- "tests/"
target: 100%
unit-tests:
threshold: 0.2%
flags:
- unit
functional-tests:
threshold: 0.2%
flags:
- functional
integration-tests:
threshold: 0.2%
flags:
- integration
external-tests:
threshold: 0.2%
flags:
- external
patch:
default:
target: 80% # new contributions should have a coverage at least equal to target
target: 80%
10 changes: 0 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,3 @@ jobs:
uses: ./.github/workflows/step_build.yml
with:
upload: ${{ inputs.upload-build-artifacts || false }}

pass:
needs: [pre-commit, codeql, test-unit-functional-integration, test-pip, test-conda, test-ui, build]
runs-on: ubuntu-latest
steps:
- name: Check jobs
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
if: always()
23 changes: 13 additions & 10 deletions .github/workflows/step_tests-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ jobs:
os: [ 'ubuntu-latest', 'macos-latest', 'windows-latest' ]
python-version: [ 3.11 ]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -el {0}

steps:
- name: Checkout
Expand All @@ -38,29 +41,29 @@ jobs:
use-only-tar-bz2: true

- name: Install from source
shell: pwsh
run: python -m pip install -e '.[test-external,test-cov]'

- name: Create kernel
shell: pwsh
run: |
python -m ipykernel install --name jupytext-ci --user
- name: Conda list
shell: pwsh
run: conda list

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

- name: Test lab extension
shell: pwsh
run: |
# Check extension
jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "jupyterlab-jupytext.*OK"
python -m jupyterlab.browser_check
- name: Test with pytest
shell: pwsh
run: pytest --cov
# We use an explicit coverage file otherwise the
# codecov action below does not find it
run: pytest --cov . --cov-report xml:coverage.xml

- name: Upload coverage
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
verbose: true
files: coverage.xml
20 changes: 7 additions & 13 deletions .github/workflows/step_tests-pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,17 @@ concurrency:

jobs:
test-pip:
continue-on-error: ${{ matrix.experimental || false }}
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
markdown-it-py-version: ["~=2.0"]
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12-dev"]
markdown-it-py-version: ["~=3.0"]
include:
- python-version: "3.12-dev"
experimental: true
- python-version: "3.13-dev"
experimental: true
- python-version: "3.x"
markdown-it-py-version: ""
- python-version: "3.x"
markdown-it-py-version: "~=3.0"
markdown-it-py-version: "~=2.0"
- python-version: "3.x"
markdown-it-py-version: "~=4.0"
experimental: true
markdown-it-py-version: ""
- python-version: "3.x"
no_kernel: true
- python-version: "3.x"
Expand Down Expand Up @@ -74,3 +65,6 @@ jobs:

- name: Upload coverage
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
verbose: true
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ test-functional = [
]
test-integration = [
"jupytext[test-functional]",
"jupyter-server",
"jupyter-server!=2.11", # issue 1165
# jupytext --execute
"nbconvert",
"ipykernel",
Expand Down

0 comments on commit e1c6d13

Please sign in to comment.