Skip to content

Commit bf5c874

Browse files
authored
Update the CI (#1204)
* Keep dependencies unchanged for now * Define no_markdown-it-py in the matrix * The test with --pre dependencies is experimental * Restore publish.yml * Start test-conda earlier because it's very long * Version 1.16.1-dev
1 parent 9046930 commit bf5c874

File tree

7 files changed

+32
-47
lines changed

7 files changed

+32
-47
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
if: github.event_name != 'schedule'
4949

5050
test-conda:
51-
needs: [ test-pip ]
51+
needs: [ pre-commit ]
5252
uses: ./.github/workflows/step_tests-conda.yml
5353
with:
5454
coverage: ${{ github.event_name != 'schedule' }}
Lines changed: 13 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,33 @@
1-
name: Release
1+
name: Publish
22
on:
33
push:
44
tags:
55
- "v[0-9]+.[0-9]+.[0-9]+"
66
- "v[0-9]+.[0-9]+.[0-9]+rc[0-9]+"
77
- "v[0-9]+.[0-9]+.[0-9]+dev[0-9]+"
8-
workflow_dispatch:
9-
inputs:
10-
skip-tests:
11-
type: boolean
12-
description: Skip
13-
default: false
14-
ref:
15-
type: string
16-
description: Tag to release
17-
required: true
188

199
permissions:
2010
contents: read
2111

2212
jobs:
2313
pre-commit:
2414
uses: ./.github/workflows/step_pre-commit.yml
25-
if: "! inputs.skip-tests"
2615

2716
test-pip:
2817
needs: [ pre-commit ]
2918
uses: ./.github/workflows/step_tests-pip.yml
3019
with:
3120
coverage: false
32-
if: "! inputs.skip-tests"
3321

3422
test-conda:
35-
needs: [ test-pip ]
23+
needs: [ pre-commit ]
3624
uses: ./.github/workflows/step_tests-conda.yml
3725
with:
3826
coverage: false
39-
if: "! inputs.skip-tests"
4027

4128
test-ui:
4229
needs: [ test-pip ]
4330
uses: ./.github/workflows/step_tests-ui.yml
44-
if: "! inputs.skip-tests"
4531

4632
test-status:
4733
needs: [ pre-commit, test-pip, test-conda, test-ui ]
@@ -56,9 +42,6 @@ jobs:
5642
build:
5743
needs: [ test-status ]
5844
uses: ./.github/workflows/step_build.yml
59-
with:
60-
upload: true
61-
ref: ${{ inputs.ref }}
6245

6346
publish:
6447
needs: [ build ]
@@ -73,24 +56,16 @@ jobs:
7356
id-token: write
7457

7558
steps:
76-
- uses: actions/download-artifact@v3
77-
with:
78-
name: dist
79-
path: dist
59+
- name: Checkout source
60+
uses: actions/checkout@v3
61+
62+
- name: Base Setup
63+
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
64+
65+
- name: Build package
66+
run: |
67+
python -m pip install wheel build
68+
python -m build
69+
8070
- name: Publish
8171
uses: pypa/gh-action-pypi-publish@release/v1
82-
83-
release:
84-
needs: [ publish ]
85-
name: Create release
86-
runs-on: ubuntu-latest
87-
steps:
88-
- uses: actions/checkout@v4
89-
with:
90-
ref: ${{ inputs.ref }}
91-
- uses: softprops/action-gh-release@v1
92-
with:
93-
name: Jupytext ${{ inputs.ref || github.ref_name }}
94-
draft: true
95-
prerelease: ${{ contains(inputs.ref || github.ref, 'rc') }}
96-
generate_release_notes: true

.github/workflows/step_build.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ jobs:
2222
steps:
2323
- name: Checkout source
2424
uses: actions/checkout@v4
25-
with:
26-
ref: ${{ inputs.ref }}
2725

2826
- name: Base Setup
2927
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

.github/workflows/step_tests-pip.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,24 +17,27 @@ jobs:
1717
name: >
1818
🐍 ${{ matrix.python-version }}
1919
${{ matrix.dependency_type && format('({0})', matrix.dependency_type) }}
20-
${{ matrix.markdown-it-py && format('(markdown-it-py {0})', matrix.markdown-it-py) }}
2120
${{ matrix.quarto && '(Quarto)' }}
2221
${{ matrix.no_kernel && '(No kernel)' }}
22+
${{ matrix.markdown-it-py && format('(markdown-it-py {0})', matrix.markdown-it-py) }}
23+
${{ matrix.no_markdown-it-py && '(No markdown-it-py)'}}
2324
runs-on: ubuntu-latest
2425

2526
strategy:
2627
fail-fast: false
2728
matrix:
2829
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12"]
30+
experimental: [false]
2931
include:
3032
# Test pre-release versions
3133
- python-version: "3.x"
3234
dependency_type: "pre"
35+
experimental: true # fails with pytest-8.0.0rc1
3336
# Test minimum markdown-it-py supported (otherwise the most recent version is used)
3437
- python-version: "3.x"
3538
markdown-it-py: "~=2.0"
3639
- python-version: "3.x"
37-
markdown-it-py: false
40+
no_markdown-it-py: true
3841
- python-version: "3.x"
3942
no_kernel: true
4043
- python-version: "3.x"
@@ -55,15 +58,16 @@ jobs:
5558
python -m pip install
5659
-e '.[test-cov,test-external]'
5760
jupyterlab
58-
${{ matrix.markdown-it-py && format('markdown-it-py{0}', matrix.markdown-it-py) || '' }}
61+
${{ format('markdown-it-py{0}', matrix.markdown-it-py) }}
5962
6063
- name: Install a Jupyter Kernel
6164
if: ${{ !matrix.no_kernel }}
6265
run: python -m ipykernel install --name python_kernel --user
66+
6367
- name: Uninstall markdown-it-py
6468
# Markdown-it-py is a dependency of Jupytext,
6569
# but Jupytext should still work if it is not installed
66-
if: ${{ matrix.markdown-it-py == 'false' }}
70+
if: ${{ matrix.no_markdown-it-py }}
6771
run: python -m pip uninstall markdown-it-py --yes
6872

6973
- name: Install Quarto
@@ -84,6 +88,7 @@ jobs:
8488
python -m jupyterlab.browser_check
8589
8690
- name: Test with pytest
91+
continue-on-error: ${{ matrix.experimental }}
8792
run: pytest -n logical --cov --cov-report=xml
8893

8994
- name: Upload coverage

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
Jupytext ChangeLog
22
==================
33

4+
1.16.1-dev (2024-01-??)
5+
-------------------
6+
7+
**Changed**
8+
- The CI was updated. Thanks to [Christian Le](https://github.com/LecrisUT) for taking care of this! ([#1190](https://github.com/mwouts/jupytext/issues/1190), [#1204](https://github.com/mwouts/jupytext/issues/1204))
9+
10+
411
1.16.0 (2023-12-03)
512
-------------------
613

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ classifiers = [
3333
dependencies = [
3434
"nbformat",
3535
"mdit-py-plugins",
36-
"markdown-it-py>=2.0",
36+
"markdown-it-py>=1.0",
3737
"packaging",
3838
"pyyaml",
3939
"toml",

src/jupytext/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Jupytext's version number"""
22

3-
__version__ = "1.16.0"
3+
__version__ = "1.16.1-dev"

0 commit comments

Comments
 (0)