diff --git a/.github/workflows/build_jlext.yml b/.github/workflows/build_jlext.yml new file mode 100644 index 0000000..0a41e90 --- /dev/null +++ b/.github/workflows/build_jlext.yml @@ -0,0 +1,64 @@ +on: + workflow_call: + inputs: + artifact-name: + required: false + type: string + default: 'artifact' + +jobs: + build_java_project: + runs-on: ubuntu_act_on_20 + # container: + # image: catthehacker/ubuntu:act-latest + env: + RUNNER_TOOL_CACHE: /toolcache + steps: + - uses: actions/checkout@v4 + + - name: Base Setup + uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 + + - name: Install dependencies + run: python -m pip install -U "jupyterlab>=4.0.0,<5" + + - name: Lint the extension + run: | + set -eux + jlpm + jlpm run lint:check + + - name: Test the extension + run: | + set -eux + jlpm run test + + - name: Build the extension + run: | + set -eux + python -m pip install .[test] + + pytest -vv -r ap --cov alab_project_ext + jupyter server extension list + jupyter server extension list 2>&1 | grep -ie "alab_project_ext.*OK" + + jupyter labextension list + jupyter labextension list 2>&1 | grep -ie "alab-project-ext.*OK" + python -m jupyterlab.browser_check + + - name: Package the extension + run: | + set -eux + + pip install build + python -m build + pip uninstall -y "alab_project_ext" jupyterlab + + - name: Upload extension packages + uses: actions/upload-artifact@v4 + with: + name: ${{ inputs.artifact-name }} + path: | + dist + docker + if-no-files-found: error