| 
 | 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 server extension list  | 
 | 39 | +        jupyter server extension list 2>&1 | grep -ie "jupyterlab_cell_diff.*OK"  | 
 | 40 | +
  | 
 | 41 | +        jupyter labextension list  | 
 | 42 | +        jupyter labextension list 2>&1 | grep -ie "jupyterlab-cell-diff.*OK"  | 
 | 43 | +        python -m jupyterlab.browser_check  | 
 | 44 | +
  | 
 | 45 | +    - name: Package the extension  | 
 | 46 | +      run: |  | 
 | 47 | +        set -eux  | 
 | 48 | +
  | 
 | 49 | +        pip install build  | 
 | 50 | +        python -m build  | 
 | 51 | +        pip uninstall -y "jupyterlab_cell_diff" jupyterlab  | 
 | 52 | +
  | 
 | 53 | +    - name: Upload extension packages  | 
 | 54 | +      uses: actions/upload-artifact@v4  | 
 | 55 | +      with:  | 
 | 56 | +        name: extension-artifacts  | 
 | 57 | +        path: dist/jupyterlab_cell_diff*  | 
 | 58 | +        if-no-files-found: error  | 
 | 59 | + | 
 | 60 | +  test_isolated:  | 
 | 61 | +    needs: build  | 
 | 62 | +    runs-on: ubuntu-latest  | 
 | 63 | + | 
 | 64 | +    steps:  | 
 | 65 | +    - name: Install Python  | 
 | 66 | +      uses: actions/setup-python@v5  | 
 | 67 | +      with:  | 
 | 68 | +        python-version: '3.9'  | 
 | 69 | +        architecture: 'x64'  | 
 | 70 | +    - uses: actions/download-artifact@v4  | 
 | 71 | +      with:  | 
 | 72 | +        name: extension-artifacts  | 
 | 73 | +    - name: Install and Test  | 
 | 74 | +      run: |  | 
 | 75 | +        set -eux  | 
 | 76 | +        # Remove NodeJS, twice to take care of system and locally installed node versions.  | 
 | 77 | +        sudo rm -rf $(which node)  | 
 | 78 | +        sudo rm -rf $(which node)  | 
 | 79 | +
  | 
 | 80 | +        pip install "jupyterlab>=4.0.0,<5" jupyterlab_cell_diff*.whl  | 
 | 81 | +
  | 
 | 82 | +
  | 
 | 83 | +        jupyter server extension list  | 
 | 84 | +        jupyter server extension list 2>&1 | grep -ie "jupyterlab_cell_diff.*OK"  | 
 | 85 | +
  | 
 | 86 | +        jupyter labextension list  | 
 | 87 | +        jupyter labextension list 2>&1 | grep -ie "jupyterlab-cell-diff.*OK"  | 
 | 88 | +        python -m jupyterlab.browser_check --no-browser-test  | 
 | 89 | +
  | 
 | 90 | +
  | 
 | 91 | +  check_links:  | 
 | 92 | +    name: Check Links  | 
 | 93 | +    runs-on: ubuntu-latest  | 
 | 94 | +    timeout-minutes: 15  | 
 | 95 | +    steps:  | 
 | 96 | +      - uses: actions/checkout@v4  | 
 | 97 | +      - uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1  | 
 | 98 | +      - uses: jupyterlab/maintainer-tools/.github/actions/check-links@v1  | 
0 commit comments