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