Skip to content

Commit

Permalink
Update the CI (#1204)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
mwouts committed Jan 13, 2024
1 parent 9046930 commit bf5c874
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 47 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
if: github.event_name != 'schedule'

test-conda:
needs: [ test-pip ]
needs: [ pre-commit ]
uses: ./.github/workflows/step_tests-conda.yml
with:
coverage: ${{ github.event_name != 'schedule' }}
Expand Down
51 changes: 13 additions & 38 deletions .github/workflows/release.yml → .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,33 @@
name: Release
name: Publish
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+rc[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+dev[0-9]+"
workflow_dispatch:
inputs:
skip-tests:
type: boolean
description: Skip
default: false
ref:
type: string
description: Tag to release
required: true

permissions:
contents: read

jobs:
pre-commit:
uses: ./.github/workflows/step_pre-commit.yml
if: "! inputs.skip-tests"

test-pip:
needs: [ pre-commit ]
uses: ./.github/workflows/step_tests-pip.yml
with:
coverage: false
if: "! inputs.skip-tests"

test-conda:
needs: [ test-pip ]
needs: [ pre-commit ]
uses: ./.github/workflows/step_tests-conda.yml
with:
coverage: false
if: "! inputs.skip-tests"

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

test-status:
needs: [ pre-commit, test-pip, test-conda, test-ui ]
Expand All @@ -56,9 +42,6 @@ jobs:
build:
needs: [ test-status ]
uses: ./.github/workflows/step_build.yml
with:
upload: true
ref: ${{ inputs.ref }}

publish:
needs: [ build ]
Expand All @@ -73,24 +56,16 @@ jobs:
id-token: write

steps:
- uses: actions/download-artifact@v3
with:
name: dist
path: dist
- name: Checkout source
uses: actions/checkout@v3

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

- name: Build package
run: |
python -m pip install wheel build
python -m build
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1

release:
needs: [ publish ]
name: Create release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
- uses: softprops/action-gh-release@v1
with:
name: Jupytext ${{ inputs.ref || github.ref_name }}
draft: true
prerelease: ${{ contains(inputs.ref || github.ref, 'rc') }}
generate_release_notes: true
2 changes: 0 additions & 2 deletions .github/workflows/step_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ jobs:
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}

- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/step_tests-pip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,27 @@ jobs:
name: >
🐍 ${{ matrix.python-version }}
${{ matrix.dependency_type && format('({0})', matrix.dependency_type) }}
${{ matrix.markdown-it-py && format('(markdown-it-py {0})', matrix.markdown-it-py) }}
${{ matrix.quarto && '(Quarto)' }}
${{ matrix.no_kernel && '(No kernel)' }}
${{ matrix.markdown-it-py && format('(markdown-it-py {0})', matrix.markdown-it-py) }}
${{ matrix.no_markdown-it-py && '(No markdown-it-py)'}}
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12"]
experimental: [false]
include:
# Test pre-release versions
- python-version: "3.x"
dependency_type: "pre"
experimental: true # fails with pytest-8.0.0rc1
# Test minimum markdown-it-py supported (otherwise the most recent version is used)
- python-version: "3.x"
markdown-it-py: "~=2.0"
- python-version: "3.x"
markdown-it-py: false
no_markdown-it-py: true
- python-version: "3.x"
no_kernel: true
- python-version: "3.x"
Expand All @@ -55,15 +58,16 @@ jobs:
python -m pip install
-e '.[test-cov,test-external]'
jupyterlab
${{ matrix.markdown-it-py && format('markdown-it-py{0}', matrix.markdown-it-py) || '' }}
${{ format('markdown-it-py{0}', matrix.markdown-it-py) }}
- name: Install a Jupyter Kernel
if: ${{ !matrix.no_kernel }}
run: python -m ipykernel install --name python_kernel --user

- name: Uninstall markdown-it-py
# Markdown-it-py is a dependency of Jupytext,
# but Jupytext should still work if it is not installed
if: ${{ matrix.markdown-it-py == 'false' }}
if: ${{ matrix.no_markdown-it-py }}
run: python -m pip uninstall markdown-it-py --yes

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

- name: Upload coverage
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Jupytext ChangeLog
==================

1.16.1-dev (2024-01-??)
-------------------

**Changed**
- 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))


1.16.0 (2023-12-03)
-------------------

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ classifiers = [
dependencies = [
"nbformat",
"mdit-py-plugins",
"markdown-it-py>=2.0",
"markdown-it-py>=1.0",
"packaging",
"pyyaml",
"toml",
Expand Down
2 changes: 1 addition & 1 deletion src/jupytext/version.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
"""Jupytext's version number"""

__version__ = "1.16.0"
__version__ = "1.16.1-dev"

0 comments on commit bf5c874

Please sign in to comment.