Skip to content

Commit

Permalink
Add notebook v6 workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
trungleduc committed Nov 7, 2023
1 parent e6fb08e commit 7bdf0ca
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 2 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 build 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" -
23 changes: 23 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,29 @@ source = "nodejs"
[tool.hatch.metadata.hooks.nodejs]
fields = ["description", "authors", "urls"]

[tool.hatch.build]
include = [
"LICENSE",
"package.json",
"install.json",
"ts*.json",
"yarn.lock",
"voila_gridstack",
"src",
"style",
]
exclude = [
"lib",
"**/node_modules",
"binder",
"assets",
"*~",
"*.pyc",
"*.pyo",
"*.git",
".ipynb_checkpoints"
]

[tool.hatch.build.targets.sdist]
artifacts = [
"/voila_gridstack/labextension",
Expand Down

0 comments on commit 7bdf0ca

Please sign in to comment.