Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build script for latest JupyterLab #23

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
38 changes: 34 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,59 @@ jobs:
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1

- name: Install dependencies
run: python -m pip install -U 'jupyterlab>=4.0.0,<5'
run: python -m pip install -U 'jupyterlab>=4.0.0,<5' && python -m pip install -U 'notebook>=7,<8'

- name: Build the extension
run: |
set -eux
jlpm
jlpm lint:check
jlpm run eslint:check
cd ./components
npm install
npm run build
cd ..
cd ./nbextension
npm install
npm run build
cd ..
python -m pip install .

jupyter labextension list 2>&1 | grep -ie "lc_notebook_diff.*OK"
python -m jupyterlab.browser_check

jlpm install
cd ./ui-tests
jlpm install
jlpm playwright install
jlpm playwright test
cd ..

pip install build
python -m build --sdist
cp dist/*.tar.gz myextension.tar.gz
pip uninstall -y "lc_notebook_diff" jupyterlab
rm -rf myextension

- uses: actions/upload-artifact@v2
npm pack
mv lc_notebook_diff-*.tgz myextension-nodejs.tgz

- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: ui-tests/playwright-report/
retention-days: 30

- uses: actions/upload-artifact@v4
with:
name: myextension-sdist
path: myextension.tar.gz

- uses: actions/upload-artifact@v4
with:
name: myextension-nodejs
path: myextension-nodejs.tgz

test_isolated:
needs: build
runs-on: ubuntu-latest
Expand All @@ -52,7 +82,7 @@ jobs:
with:
python-version: '3.9'
architecture: 'x64'
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: myextension-sdist
- name: Install and Test
Expand Down
63 changes: 0 additions & 63 deletions .github/workflows/check-release.yml

This file was deleted.

15 changes: 11 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,19 @@ jobs:
npm pack
mv lc_notebook_diff-*.tgz myextension-nodejs.tgz

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: ui-tests/playwright-report/
retention-days: 30

- uses: actions/upload-artifact@v4
with:
name: myextension-sdist
path: myextension.tar.gz

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: myextension-nodejs
path: myextension-nodejs.tgz
Expand All @@ -96,10 +103,10 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: myextension-sdist
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v4
with:
name: myextension-nodejs
- name: release
Expand Down
2 changes: 1 addition & 1 deletion hatch_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ class CustomHook(BuildHookInterface):

def initialize(self, version, build_data):
"""Initialize the hook."""
if self.target_name not in ["wheel", "sdist"]:
if self.target_name not in ["sdist"]:
return
build_nbextension()
Loading