From 71a4c663d0b52f9b21204c00da89a37e7f356bbf Mon Sep 17 00:00:00 2001 From: Marc Wouts Date: Fri, 24 Nov 2023 21:26:11 +0000 Subject: [PATCH 1/5] Test against jupyter-server!=2.11 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e9bc8d8b..4b6efef4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,7 @@ test-functional = [ ] test-integration = [ "jupytext[test-functional]", - "jupyter-server", + "jupyter-server!=2.11", # issue 1165 # jupytext --execute "nbconvert", "ipykernel", From a7a16f3945b200daced6a92baef3c6f3ef38ee91 Mon Sep 17 00:00:00 2001 From: Marc Wouts Date: Fri, 24 Nov 2023 22:30:08 +0000 Subject: [PATCH 2/5] Remove the experimental entries in the matrix Because otherwise the commit always get a red cross --- .github/workflows/ci.yml | 10 ---------- .github/workflows/step_tests-pip.yml | 17 ++++------------- 2 files changed, 4 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bc508b0b..4df7b237 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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() diff --git a/.github/workflows/step_tests-pip.yml b/.github/workflows/step_tests-pip.yml index 2c95cec6..57ce0b57 100644 --- a/.github/workflows/step_tests-pip.yml +++ b/.github/workflows/step_tests-pip.yml @@ -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" From daf543f01738ae9abf458cfc3940d20bca528448 Mon Sep 17 00:00:00 2001 From: Marc Wouts Date: Fri, 24 Nov 2023 22:50:32 +0000 Subject: [PATCH 3/5] Use a default shell --- .github/workflows/step_tests-conda.yml | 18 +++++++++--------- .github/workflows/step_tests-pip.yml | 3 +++ 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/step_tests-conda.yml b/.github/workflows/step_tests-conda.yml index ce105fc6..1f67cdda 100644 --- a/.github/workflows/step_tests-conda.yml +++ b/.github/workflows/step_tests-conda.yml @@ -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 @@ -38,20 +41,15 @@ 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 @@ -59,8 +57,10 @@ jobs: python -m jupyterlab.browser_check - name: Test with pytest - shell: pwsh run: pytest --cov - name: Upload coverage uses: codecov/codecov-action@v3 + with: + fail_ci_if_error: true + verbose: true diff --git a/.github/workflows/step_tests-pip.yml b/.github/workflows/step_tests-pip.yml index 57ce0b57..7f633682 100644 --- a/.github/workflows/step_tests-pip.yml +++ b/.github/workflows/step_tests-pip.yml @@ -65,3 +65,6 @@ jobs: - name: Upload coverage uses: codecov/codecov-action@v3 + with: + fail_ci_if_error: true + verbose: true From c84521c420f9b116568f145e372d6b01821ce75b Mon Sep 17 00:00:00 2001 From: Marc Wouts Date: Sat, 25 Nov 2023 14:53:43 +0000 Subject: [PATCH 4/5] Use an explicit coverage file --- .github/workflows/step_tests-conda.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/step_tests-conda.yml b/.github/workflows/step_tests-conda.yml index 1f67cdda..1f00c1a2 100644 --- a/.github/workflows/step_tests-conda.yml +++ b/.github/workflows/step_tests-conda.yml @@ -57,10 +57,13 @@ jobs: python -m jupyterlab.browser_check - name: Test with pytest - 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 From b05b0b852d80b2855f297369f804a439a6e2af0f Mon Sep 17 00:00:00 2001 From: Marc Wouts Date: Sat, 25 Nov 2023 16:09:58 +0000 Subject: [PATCH 5/5] Allow coverage fluctuations up to 0.2% --- .github/codecov.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/codecov.yml b/.github/codecov.yml index 8e3dfbb9..82f49b34 100644 --- a/.github/codecov.yml +++ b/.github/codecov.yml @@ -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%