Skip to content

Add extension for Jupyter Notebook 7 #512

Add extension for Jupyter Notebook 7

Add extension for Jupyter Notebook 7 #512

Workflow file for this run

# This is a GitHub workflow defining a set of jobs with a set of steps.
# ref: https://docs.github.com/en/actions/learn-github-actions/workflow-syntax-for-github-actions
#
name: Test
on:
pull_request:
paths-ignore:
- "docs/**"
- "contrib/**"
- "**.md"
- ".github/workflows/*"
- "!.github/workflows/test.yaml"
push:
paths-ignore:
- "docs/**"
- "contrib/**"
- "**.md"
- ".github/workflows/*"
- "!.github/workflows/test.yaml"
branches-ignore:
- "dependabot/**"
- "pre-commit-ci-update-config"
workflow_dispatch:
env:
# avoid warnings about config paths
JUPYTER_PLATFORM_DIRS: "1"
jobs:
build:
runs-on: ubuntu-22.04
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- uses: actions/setup-node@v3
with:
cache: yarn
node-version: 20.x
registry-url: https://registry.npmjs.org
cache-dependency-path: labextension/yarn.lock
- name: Update root build packages
run: pip install --upgrade build
- name: Build Python package
run: pyproject-build
- name: Upload built artifacts
uses: actions/upload-artifact@v3
with:
name: dist-${{ github.run_number }}
path: ./dist
test:
name: |-
${{ matrix.os }}
${{ matrix.python-version }}
s${{ matrix.jupyter_server-version }}
lab${{ matrix.jupyterlab-version }}
nb${{ matrix.notebook-version }}
needs: [build]
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.11"]
jupyter_server-version: ["1", "2"]
jupyterlab-version: ["3", "4"]
os: [ubuntu-22.04]
include:
- python-version: "3.11"
jupyter_server-version: "2"
jupyterlab-version: "3"
notebook-version: "6"
os: windows-2022
- python-version: "3.11"
jupyter_server-version: "2"
jupyterlab-version: "4"
os: windows-2022
notebook-version: "7"
- jupyterlab-version: "3"
notebook-version: "6"
- jupyterlab-version: "4"
notebook-version: "7"
exclude:
- jupyter_server-version: "1"
jupyterlab-version: "4"
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "${{ matrix.python-version }}"
- name: Update root build packages
run: pip install --upgrade pip
- name: Download built artifacts
uses: actions/download-artifact@v3
with:
name: dist-${{ github.run_number }}
path: ./dist
- name: Install Python package
# NOTE: See CONTRIBUTING.md for a local development setup that differs
# slightly from this.
#
# Pytest options are set in `pyproject.toml`.
run: |
pip install -vv $(ls ./dist/*.whl)\[acceptance\] 'jupyterlab~=${{ matrix.jupyterlab-version }}.0' 'jupyter_server~=${{ matrix.jupyter_server-version }}.0' 'notebook~=${{ matrix.notebook-version }}.0'
- name: List Python packages
run: |
pip freeze
pip check
- name: Check the Notebook Server extension is installed
if: matrix.jupyterlab-version != '4'
run: |
jupyter serverextension list
jupyter serverextension list 2>&1 | grep -iE "jupyter_server_proxy.*OK" -
- name: Check the Jupyter Server extension is installed
run: |
pip install jupyter-server
jupyter server extension list
jupyter server extension list 2>&1 | grep -iE "jupyter_server_proxy.*OK" -
- name: Check the lab extension
run: |
jupyter labextension list
jupyter labextension list 2>&1 | grep -iE '@jupyterhub/jupyter-server-proxy.*OK.*'
- name: Run tests
run: |
mkdir build
cd build
pytest -vv ../tests -c ../pyproject.toml
- name: Upload test reports
if: always()
uses: actions/upload-artifact@v3
with:
name: |-
tests-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.jupyterlab-version }}-${{ github.run_number }}
path: |
./build/pytest
./build/coverage
./build/robot