Skip to content

Commit

Permalink
Fix build test
Browse files Browse the repository at this point in the history
  • Loading branch information
hbcarlos committed Feb 19, 2023
1 parent 1a385ac commit 39a1ad0
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 25 deletions.
55 changes: 31 additions & 24 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,69 +2,76 @@ name: Build

on:
push:
branches: master
branches: main
pull_request:
branches: '*'

jobs:
build:
runs-on: ubuntu-latest

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

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

- name: Install dependencies
run: python -m pip install -U check-manifest jupyterlab
run: python -m pip install -U "jupyterlab>=3.0,<3.6"

- name: Build the extension
run: |
set -eux
# TODO: add lint check
#pushd js
#jlpm
#jlpm run eslint:check
#popd
python -m pip install .
#jupyter server extension list
#jupyter server extension list 2>&1 | grep -ie "jupyros.*OK"
jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "@robostack/jupyter-ros.*OK"
python -m jupyterlab.browser_check
check-manifest -v
- name: Package the extension
run: |
set -eux
pip install build
python -m build --sdist
cp dist/*.tar.gz myextension.tar.gz
python -m build
pip uninstall -y "jupyros" jupyterlab
rm -rf myextension
- uses: actions/upload-artifact@v2
- name: Upload extension packages
uses: actions/upload-artifact@v3
with:
name: myextension-sdist
path: myextension.tar.gz
name: extension-artifacts
path: dist/jupyros*
if-no-files-found: error

test_isolated:
needs: build
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.9'
architecture: 'x64'
- uses: actions/download-artifact@v2
- uses: actions/download-artifact@v3
with:
name: myextension-sdist
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)
pip install myextension.tar.gz
pip install jupyterlab
pip install "jupyterlab>=3.0,<3.6" jupyros*.whl
#jupyter server extension list
#jupyter server extension list 2>&1 | grep -ie "jupyros.*OK"
jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "@robostack/jupyter-ros.*OK"
python -m jupyterlab.browser_check --no-browser-test
python -m jupyterlab.browser_check --no-chrome-test
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ version_cmd = "hatch version"
[tool.jupyter-releaser.hooks]
before-bump-version = ["python -m pip install --pre -U 'jupyterlab>=3.0,<3.6'", "cd js && jlpm"]
before-build-npm = ["cd js && jlpm build:prod"]
before-build-python = ["ls -la", "cd js && jlpm clean", "ls -la", "cd js && jlpm build:prod"]
before-build-python = ["cd js && jlpm build:prod"]

[tool.check-wheel-contents]
ignore = ["W002"]

0 comments on commit 39a1ad0

Please sign in to comment.