|
| 1 | +name: Build |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: main |
| 6 | + pull_request: |
| 7 | + branches: '*' |
| 8 | + |
| 9 | +concurrency: |
| 10 | + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} |
| 11 | + cancel-in-progress: true |
| 12 | + |
| 13 | +jobs: |
| 14 | + build: |
| 15 | + runs-on: ubuntu-latest |
| 16 | + |
| 17 | + steps: |
| 18 | + - name: Checkout |
| 19 | + uses: actions/checkout@v4 |
| 20 | + |
| 21 | + - name: Base Setup |
| 22 | + uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 |
| 23 | + |
| 24 | + - name: Install dependencies |
| 25 | + run: python -m pip install -U "jupyterlab>=4.0.0,<5" |
| 26 | + |
| 27 | + - name: Lint the extension |
| 28 | + run: | |
| 29 | + set -eux |
| 30 | + jlpm |
| 31 | + jlpm run lint:check |
| 32 | +
|
| 33 | + - name: Build the extension |
| 34 | + run: | |
| 35 | + set -eux |
| 36 | + python -m pip install .[test] |
| 37 | +
|
| 38 | + jupyter labextension list |
| 39 | + jupyter labextension list 2>&1 | grep -ie "distributed-jupyter-demo.*OK" |
| 40 | + python -m jupyterlab.browser_check |
| 41 | +
|
| 42 | + - name: Package the extension |
| 43 | + run: | |
| 44 | + set -eux |
| 45 | +
|
| 46 | + pip install build |
| 47 | + python -m build |
| 48 | + pip uninstall -y "distributed_jupyter_demo" jupyterlab |
| 49 | +
|
| 50 | + - name: Upload extension packages |
| 51 | + uses: actions/upload-artifact@v4 |
| 52 | + with: |
| 53 | + name: extension-artifacts |
| 54 | + path: dist/distributed_jupyter_demo* |
| 55 | + if-no-files-found: error |
| 56 | + |
| 57 | + test_isolated: |
| 58 | + needs: build |
| 59 | + runs-on: ubuntu-latest |
| 60 | + |
| 61 | + steps: |
| 62 | + - name: Install Python |
| 63 | + uses: actions/setup-python@v5 |
| 64 | + with: |
| 65 | + python-version: '3.9' |
| 66 | + architecture: 'x64' |
| 67 | + - uses: actions/download-artifact@v4 |
| 68 | + with: |
| 69 | + name: extension-artifacts |
| 70 | + - name: Install and Test |
| 71 | + run: | |
| 72 | + set -eux |
| 73 | + # Remove NodeJS, twice to take care of system and locally installed node versions. |
| 74 | + sudo rm -rf $(which node) |
| 75 | + sudo rm -rf $(which node) |
| 76 | +
|
| 77 | + pip install "jupyterlab>=4.0.0,<5" distributed_jupyter_demo*.whl |
| 78 | +
|
| 79 | +
|
| 80 | + jupyter labextension list |
| 81 | + jupyter labextension list 2>&1 | grep -ie "distributed-jupyter-demo.*OK" |
| 82 | + python -m jupyterlab.browser_check --no-browser-test |
| 83 | +
|
| 84 | +
|
| 85 | + check_links: |
| 86 | + name: Check Links |
| 87 | + runs-on: ubuntu-latest |
| 88 | + timeout-minutes: 15 |
| 89 | + steps: |
| 90 | + - uses: actions/checkout@v4 |
| 91 | + - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 |
| 92 | + - uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1 |
0 commit comments