Files
reusing_workflows/.github/workflows/build_jlext.yml
2024-04-08 16:33:45 +08:00

72 lines
1.8 KiB
YAML

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: Install yarn
run: |
curl -fsSL --create-dirs -o $HOME/bin/yarn \
https://github.com/yarnpkg/yarn/releases/download/v1.22.22/yarn-1.22.22.js
chmod +x $HOME/bin/yarn
echo "$HOME/bin" >> $GITHUB_PATH
- 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