Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
ac01f79
bump action versions
bollwyvl Nov 26, 2025
c7e6f3b
initial relock
bollwyvl Nov 26, 2025
f0889a7
apply linter
bollwyvl Nov 26, 2025
40f88b4
more lint
bollwyvl Nov 26, 2025
b9e2dea
apply eslint consistent-type-imports, bump more deps
bollwyvl Nov 26, 2025
4857cc6
bump more min versions
bollwyvl Nov 26, 2025
8679418
start updating jest config
bollwyvl Nov 26, 2025
e8b5955
start jest
bollwyvl Nov 26, 2025
bd3d78b
more test muddling
bollwyvl Nov 26, 2025
866f1da
more python
bollwyvl Nov 26, 2025
8e991ab
unique artifact names
bollwyvl Nov 26, 2025
6c23109
more ci
bollwyvl Nov 27, 2025
56a9d2d
fix build
bollwyvl Nov 27, 2025
28e8007
update some ui tests
bollwyvl Nov 27, 2025
7e6faa1
more ui test, remove update-integration-tests workflow
bollwyvl Nov 27, 2025
c1740d6
more step counting
bollwyvl Nov 27, 2025
3edda6a
fix more step counting
bollwyvl Nov 27, 2025
3d6e039
yet more steps
bollwyvl Nov 27, 2025
679ffa3
skip browser check during build
bollwyvl Nov 27, 2025
4ebf21e
more ci, test
bollwyvl Nov 27, 2025
55efcd4
more ci
bollwyvl Nov 27, 2025
c1e8091
just immutable
bollwyvl Nov 27, 2025
b4d84c0
more cache
bollwyvl Nov 27, 2025
91ea675
update selector
bollwyvl Nov 27, 2025
4ccb9e9
fix more selectors
bollwyvl Nov 27, 2025
b2f7479
skip jlpm when possible
bollwyvl Nov 27, 2025
6eb233f
add concurrency group
bollwyvl Nov 27, 2025
beaa8af
try getByRole
bollwyvl Nov 27, 2025
7657136
more ci cache
bollwyvl Nov 27, 2025
af281cc
pass notebookPage
bollwyvl Nov 27, 2025
8c8b2d6
make ajv a sharedPackage and load it lazily
bollwyvl Nov 30, 2025
2be7805
get ajv off the critical path
bollwyvl Nov 30, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
234 changes: 100 additions & 134 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,187 +2,150 @@ name: Build

on:
push:
branches: main
branches: [main]
pull_request:
branches: '*'
branches: ['*']

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
MIN_PYTHON: &min-python '3.10'
MIN_LAB: &min-lab '4.3.0'
MIN_NB: &min-nb '7.3.0'
MAX_LAB: &max-lab '4.5'
MAX_NB: &max-nb '7.5'

jobs:
build:
name: Build
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- &step-checkout
name: Checkout
uses: actions/checkout@v6

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

- name: Install dependencies
run: python -m pip install -U "jupyterlab>=4.0.0,<5"

- name: Lint the extension
run: |
set -eux
jlpm
jlpm run lint:check

- name: Test the extension
run: |
set -eux
jlpm run test
- &step-py-deps
name: Install Python dependencies
run: |-
python -m pip install -v -U "jupyterlab~=${MIN_LAB}" build
pip check

- name: Build the extension
run: |
set -eux
python -m pip install .[test]
- &step-js-cache
name: Set up JS cache
uses: &uses-cache actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }}

jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "jupyterlab-tour.*OK"
python -m jupyterlab.browser_check
- &step-js-deps
name: Install JS dependencies
run: &run-maybe-jlpm ls node_modules/.yarn-state.yml || jlpm --immutable

- name: Package the extension
run: |
set -eux

pip install build
python -m build
pip uninstall -y "jupyterlab_tour" jupyterlab
run: pyproject-build .

- name: Upload extension packages
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v5
with:
name: extension-artifacts
name: &dist jpt-${{ github.run_number }}-dist
path: dist/jupyterlab_tour*
if-no-files-found: error

test_isolated:
smoke-test:
name: Smoke Test
needs: build
runs-on: ubuntu-latest

steps:
- name: Install Python
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: '3.9'
python-version: *min-python
architecture: 'x64'
- uses: actions/download-artifact@v3

- &step-download-dist
name: Download extension package
uses: actions/download-artifact@v6
with:
name: extension-artifacts
- name: Install and Test
run: |
set -eux
# Remove NodeJS, twice to take care of system and locally installed node versions.
sudo rm -rf $(which node)
sudo rm -rf $(which node)
name: *dist

pip install "jupyterlab>=4.0.0,<5" jupyterlab_tour*.whl
- name: Install Extension
run: pip install -v "jupyterlab~=${MIN_LAB}" jupyterlab_tour*.whl

- name: Smoke Test
run: |
jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "jupyterlab-tour.*OK"
python -m jupyterlab.browser_check --no-browser-test

integration-tests-lab:
name: Integration tests for JupyterLab
strategy:
fail-fast: false
matrix:
jupyterlab: ['3.6', '4.0']
needs: build
unit-test:
name: Unit Test/Lint
runs-on: ubuntu-latest

env:
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/pw-browsers

steps:
- name: Checkout
uses: actions/checkout@v3

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

- name: Download extension package
uses: actions/download-artifact@v3
with:
name: extension-artifacts

- name: Install the extension
run: |
set -eux
python -m pip install "jupyterlab~=${{ matrix.jupyterlab }}" jupyterlab_tour*.whl
- *step-checkout
- *step-base-setup
- *step-js-cache
- *step-py-deps
- *step-js-deps

- name: Install dependencies
working-directory: ui-tests
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
run: |
if [[ "${{ matrix.jupyterlab }}" == "3.6" ]]; then
jlpm add -D "@jupyterlab/galata@^4.0.0"
fi
jlpm install

- name: Set up browser cache
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/pw-browsers
key: ${{ runner.os }}-${{ hashFiles('ui-tests/yarn.lock') }}

- name: Install browser
run: jlpm playwright install chromium
working-directory: ui-tests

- name: Execute integration tests
working-directory: ui-tests
run: |
jlpm playwright test --output test-results-${{ matrix.jupyterlab }}
- name: Lint the extension
run: jlpm run lint:check

- name: Upload Playwright Test report
if: always()
uses: actions/upload-artifact@v3
with:
name: jupyterlab-tour-playwright-tests
path: |
ui-tests/test-results*
ui-tests/playwright-report
- name: Test the extension
run: jlpm run test

integration-tests-nb:
name: Integration tests for Notebook
needs: build
ui-tests:
name: UI tests (${{ matrix.client }} ~${{ matrix.client-version }})
needs: [smoke-test, unit-test]
runs-on: ubuntu-latest

env:
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/pw-browsers

PLAYWRIGHT_BROWSERS_PATH: &path-browsers ${{ github.workspace }}/pw-browsers
strategy:
fail-fast: false
matrix:
include:
- client: jupyterlab
client-version: *min-lab
- client: jupyterlab
client-version: *max-lab
- client: notebook
client-version: *min-nb
jest-args: &jest-nb -c playwright-notebook.config.js
- client: notebook
client-version: *max-nb
jest-args: *jest-nb
steps:
- name: Checkout
uses: actions/checkout@v3
- *step-checkout
- *step-base-setup
- *step-download-dist

- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Set up JS cache
uses: *uses-cache
with:
path: ui-tests/node_modules
key: &key-ui-yarn-lock ${{ runner.os }}-${{ hashFiles('ui-tests/yarn.lock') }}

- name: Download extension package
uses: actions/download-artifact@v3
- name: Set up browser cache
uses: *uses-cache
with:
name: extension-artifacts
path: *path-browsers
key: *key-ui-yarn-lock

- name: Install the extension
run: |
set -eux
python -m pip install "notebook~=7.0" jupyterlab_tour*.whl
python -m pip install "${{ matrix.client }}~=${{ matrix.client-version }}" jupyterlab_tour*.whl

- name: Install dependencies
working-directory: ui-tests
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
run: |
jlpm install

- name: Set up browser cache
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/pw-browsers
key: ${{ runner.os }}-${{ hashFiles('ui-tests/yarn.lock') }}
run: *run-maybe-jlpm

- name: Install browser
run: jlpm playwright install chromium
Expand All @@ -191,22 +154,25 @@ jobs:
- name: Execute integration tests
working-directory: ui-tests
run: |
jlpm playwright test -c playwright-notebook.config.js
jlpm playwright test \
--output test-results-${{ matrix.client }}-${{ matrix.client-version}} \
${{ matrix.jest-args }}

- name: Upload Playwright Test report
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v5
with:
name: notebook-tour-playwright-tests
name: |-
jpt-${{ github.run_number }}-ui-tests-${{ matrix.client }}-${{ matrix.client-version }}
path: |
ui-tests/test-results
ui-tests/test-results*
ui-tests/playwright-report

check_links:
name: Check Links
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
- *step-checkout
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1
4 changes: 2 additions & 2 deletions .github/workflows/check-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v6
- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Install Dependencies
Expand All @@ -22,7 +22,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Upload Distributions
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v5
with:
name: jupyterlab-tour-releaser-dist-${{ github.run_number }}
path: .jupyter_releaser_checkout/dist
Loading
Loading