name: ipykernel tests on: push: branches: ["main"] pull_request: schedule: - cron: "0 0 * * *" concurrency: group: ci-${{ github.ref }} cancel-in-progress: true defaults: run: shell: bash -eux {0} jobs: build: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: [ubuntu-latest, windows-latest, macos-latest] qt: - qt5 - qt6 python-version: - "3.10" - "3.11" - "3.12" - "3.13" - "3.14" # 3.14t needs a jupyter-core release # - "3.14t" - "pypy-3.11" exclude: # qt6 not supported on 3.14 yet - python-version: "3.14" qt: qt6 - python-version: "3.13" qt: qt5 - python-version: "3.12" qt: qt5 - python-version: "3.11" qt: qt5 steps: - name: Checkout uses: actions/checkout@v6 - uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - name: set qt env run: | echo "QT=${{ matrix.qt }}" >> $GITHUB_ENV shell: bash - name: Install hatch run: | python --version python -m pip install hatch - name: Run the tests timeout-minutes: 15 if: ${{ !startsWith( matrix.python-version, 'pypy' ) && !startsWith(matrix.os, 'windows') }} run: | hatch run cov:test --cov-fail-under 50 - name: Run the tests on pypy timeout-minutes: 15 if: ${{ startsWith( matrix.python-version, 'pypy' ) }} run: | hatch run test:nowarn --ignore=tests/test_debugger.py - name: Run the tests on Windows timeout-minutes: 15 if: ${{ !startsWith( matrix.python-version, 'pypy' ) && startsWith(matrix.os, 'windows') }} run: | hatch run cov:nowarn - name: Check Launcher run: | pip install . cd $HOME python -m ipykernel_launcher --help - uses: jupyterlab/maintainer-tools/.github/actions/upload-coverage@v1 coverage: runs-on: ubuntu-latest needs: - build steps: - uses: actions/checkout@v6 - uses: jupyterlab/maintainer-tools/.github/actions/report-coverage@v1 with: fail_under: 80 test_lint: name: Test Lint runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - name: Run Linters run: | hatch run typing:test hatch run lint:build pipx run interrogate -vv . pipx run doc8 --max-line-length=200 check_release: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - uses: jupyter-server/jupyter_releaser/.github/actions/check-release@v2 with: token: ${{ secrets.GITHUB_TOKEN }} test_docs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - name: Build API docs run: | hatch run docs:api # If this fails run `hatch run docs:api` locally # and commit. git status --porcelain git status -s | grep "A" && exit 1 git status -s | grep "M" && exit 1 echo "API docs done" - run: hatch run docs:build test_without_debugpy: runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: os: [ubuntu-latest] python-version: ["3.10"] steps: - name: Checkout uses: actions/checkout@v6 - name: Base Setup uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - name: Install the Python dependencies without debugpy run: | pip install .[test] pip uninstall --yes debugpy - name: List installed packages run: | pip freeze - name: Run the tests timeout-minutes: 15 run: pytest -W default -vv test_miniumum_versions: name: Test Minimum Versions timeout-minutes: 20 runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - name: Base Setup uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 with: dependency_type: minimum python_version: "3.10" - name: List installed packages run: | hatch -v run test:list - name: Run the unit tests run: | hatch -v run test:nowarn test_prereleases: name: Test Prereleases runs-on: ubuntu-latest timeout-minutes: 20 steps: - name: Checkout uses: actions/checkout@v6 - name: Base Setup uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 with: dependency_type: pre - name: Run the tests run: | hatch run test:nowarn make_sdist: name: Make SDist runs-on: ubuntu-latest timeout-minutes: 20 steps: - uses: actions/checkout@v6 - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - uses: jupyterlab/maintainer-tools/.github/actions/make-sdist@v1 test_sdist: runs-on: ubuntu-latest needs: [make_sdist] name: Install from SDist and Test timeout-minutes: 20 steps: - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - uses: jupyterlab/maintainer-tools/.github/actions/test-sdist@v1 link_check: runs-on: ubuntu-latest steps: - uses: actions/checkout@v6 - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 - uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1