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

Follow-up #926: Add the test for jupyterlab exntension build #969

Draft
wants to merge 8 commits into
base: main
Choose a base branch
from
Draft
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
50 changes: 44 additions & 6 deletions .github/workflows/python-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand All @@ -29,9 +29,9 @@ jobs:
build-python-package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: '20'
- name: Set up Python
Expand All @@ -50,7 +50,7 @@ jobs:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']
optuna-version: ['optuna>=3.1.0']
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup Python${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
Expand All @@ -71,7 +71,7 @@ jobs:
test-with-optuna-master:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
Expand All @@ -90,7 +90,7 @@ jobs:
test-with-optuna-oldest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v4
with:
Expand All @@ -106,3 +106,41 @@ jobs:
- name: Run python unit tests
run: |
pytest python_tests
test-build:
name: Test build for JupyterLab extension
runs-on: ubuntu-latest

steps:
- name: Check out code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
architecture: x64

- name: Install dependencies
run: |
python -m pip install --progress-bar off --upgrade pip setuptools build
pip install --progress-bar off jupyterlab
pip install --progress-bar off .

- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- run: make tslib

- name: Build JavaScript dependencies
working-directory: optuna_dashboard
run: |
npm install
npm run build:pkg

- name: Build package
working-directory: jupyterlab
run: python -m build --sdist

2 changes: 1 addition & 1 deletion jupyterlab/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["hatchling>=1.5.0", "jupyterlab>=4.0.0,<5", "hatch-nodejs-version>=0.3.2"]
requires = ["hatchling>=1.5.0", "jupyterlab>=4.0.0,<5", "hatch-nodejs-version>=0.3.2", "git+https://github.com/c-bata/hatch-jupyter-builder.git@debug-subprocess-check-call"]
build-backend = "hatchling.build"

[project]
Expand Down
Loading
Loading