Skip to content

Commit

Permalink
Add notebook v6 workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
trungleduc authored and martinRenou committed Nov 7, 2023
1 parent 19d555f commit 0056777
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 3 deletions.
46 changes: 44 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ on:
branches: '*'

jobs:
build:
lab-build:
name: JupyterLab Build
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -27,7 +28,7 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install jupyter_packaging jupyterlab
python -m pip install jupyter_packaging jupyterlab hatch
- name: Install the extension
run: |
Expand All @@ -48,3 +49,44 @@ jobs:
run: |
jlpm && jlpm build
jlpm run test
- name: Build the extension
run: |
python -m hatch build
- uses: actions/upload-artifact@v3
with:
name: gridstack-package
path: dist/*.whl

classic-notebook:
name: Notebook v6 Build
needs: lab-build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- uses: actions/download-artifact@v3
with:
name: gridstack-package
path: dist

- name: Install Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
architecture: 'x64'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install "notebook<7"
- name: Install the extension
run: |
pip install dist/*.whl
- name: Check the extensions are installed
run: |
jupyter nbextension list 2>&1 | grep -ie "voila-gridstack/extension.*enabled" -
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,15 @@ source = "nodejs"
[tool.hatch.metadata.hooks.nodejs]
fields = ["description", "authors", "urls"]


[tool.hatch.build.targets.sdist]
artifacts = [
"/voila_gridstack/labextension",
"/voila_gridstack/nbextension",
"/voila_gridstack/template",
"/voila_gridstack/config",
]
exclude = ["/.github", "/binder", "node_modules"]
exclude = ["/.github", "/binder", "node_modules", "assets", "docs", "examples"]

[tool.hatch.build.targets.wheel.shared-data]
"voila_gridstack/config/jpserver-voila-gridstack.json" = "etc/jupyter/jupyter_server_config.d/jpserver-voila-gridstack.json"
Expand Down

0 comments on commit 0056777

Please sign in to comment.