[pre-commit.ci] pre-commit autoupdate #486
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: | |
jobs: | |
test: | |
timeout-minutes: 30 | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.8", "3.11"] | |
jupyter_server-version: ["1", "2"] | |
jupyterlab-version: ["3"] | |
os: [ubuntu-22.04] | |
include: | |
- python-version: "3.11" | |
jupyter_server-version: "2" | |
jupyterlab-version: "3" | |
os: windows-2022 | |
runs-on: ${{ matrix.os }} | |
defaults: | |
run: | |
shell: bash | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "${{ matrix.python-version }}" | |
- uses: actions/setup-node@v3 | |
with: | |
cache: yarn | |
node-version: 18.x | |
registry-url: https://registry.npmjs.org | |
cache-dependency-path: labextension/yarn.lock | |
- name: Update root build packages | |
run: | | |
pip install --upgrade build pip | |
- name: Build Python package | |
run: | | |
pyproject-build | |
- 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/jupyter_server_proxy-*.whl)\[acceptance\] 'jupyterlab~=${{ matrix.jupyterlab-version }}.0' 'jupyter_server~=${{ matrix.jupyter_server-version }}.0' | |
- name: List Python packages | |
run: | | |
pip freeze | |
pip check | |
- name: Run tests | |
run: | | |
pytest -k "not acceptance" -vv | |
- name: Upload pytest and coverage reports | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: |- | |
unit-tests-${{ matrix.python-version }}-${{ matrix.jupyterlab-version }}-${{ github.run_number }} | |
path: | | |
./build/pytest | |
./build/coverage | |
- name: Check the Notebook Server extension is installed | |
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.*' | |
python -m jupyterlab.browser_check | |
- name: Run acceptance tests | |
run: | | |
pytest -s -k "acceptance" | |
- name: Upload acceptance test reports | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: |- | |
acceptance-tests-${{ matrix.python-version }}-${{ matrix.jupyterlab-version }}-${{ github.run_number }} | |
path: | | |
./build/robot |