|
| 1 | +name: Build |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - '*' |
| 7 | + pull_request: |
| 8 | + branches: |
| 9 | + - '*' |
| 10 | + |
| 11 | +permissions: |
| 12 | + contents: |
| 13 | + write |
| 14 | + |
| 15 | +env: |
| 16 | + PIP_DISABLE_PIP_VERSION_CHECK: 1 |
| 17 | + |
| 18 | +defaults: |
| 19 | + run: |
| 20 | + shell: bash -l {0} |
| 21 | + |
| 22 | +jobs: |
| 23 | + build: |
| 24 | + runs-on: ubuntu-latest |
| 25 | + steps: |
| 26 | + - name: Checkout |
| 27 | + uses: actions/checkout@v2 |
| 28 | + |
| 29 | + - name: Build |
| 30 | + uses: ./.github/actions/build-dist |
| 31 | + |
| 32 | + test: |
| 33 | + runs-on: ubuntu-latest |
| 34 | + steps: |
| 35 | + - name: Checkout |
| 36 | + uses: actions/checkout@v2 |
| 37 | + |
| 38 | + - name: Base Setup |
| 39 | + uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1 |
| 40 | + |
| 41 | + - name: Install dependencies |
| 42 | + run: | |
| 43 | + python -m pip install -U jupyter_packaging~=0.10 |
| 44 | +
|
| 45 | + - name: Install the package |
| 46 | + run: | |
| 47 | + python -m pip install . |
| 48 | + jupyter labextension list 2>&1 | grep -ie "@jupyter-notebook/lab-extension.*enabled.*ok" - |
| 49 | + jupyter server extension list 2>&1 | grep -ie "notebook.*enabled" - |
| 50 | + python -m jupyterlab.browser_check |
| 51 | +
|
| 52 | + - name: Lint |
| 53 | + run: | |
| 54 | + jlpm |
| 55 | + jlpm run eslint:check |
| 56 | + jlpm run prettier:check |
| 57 | +
|
| 58 | + - name: Test |
| 59 | + run: | |
| 60 | + jlpm run build:test |
| 61 | + jlpm run test |
| 62 | +
|
| 63 | + install: |
| 64 | + needs: [build] |
| 65 | + runs-on: ${{ matrix.os }}-latest |
| 66 | + strategy: |
| 67 | + fail-fast: false |
| 68 | + matrix: |
| 69 | + os: [ubuntu, macos, windows] |
| 70 | + python: ['3.7', '3.10'] |
| 71 | + include: |
| 72 | + - python: '3.7' |
| 73 | + dist: 'notebook*.tar.gz' |
| 74 | + - python: '3.10' |
| 75 | + dist: 'notebook*.whl' |
| 76 | + - os: windows |
| 77 | + py_cmd: python |
| 78 | + - os: macos |
| 79 | + py_cmd: python3 |
| 80 | + - os: ubuntu |
| 81 | + py_cmd: python |
| 82 | + steps: |
| 83 | + - name: Install Python |
| 84 | + uses: actions/setup-python@v2 |
| 85 | + with: |
| 86 | + python-version: ${{ matrix.python }} |
| 87 | + architecture: 'x64' |
| 88 | + - uses: actions/download-artifact@v2 |
| 89 | + with: |
| 90 | + name: notebook-dist-${{ github.run_number }} |
| 91 | + path: ./dist |
| 92 | + - name: Install the prerequisites |
| 93 | + run: | |
| 94 | + ${{ matrix.py_cmd }} -m pip install pip wheel |
| 95 | + - name: Install the package |
| 96 | + run: | |
| 97 | + cd dist |
| 98 | + ${{ matrix.py_cmd }} -m pip install -vv ${{ matrix.dist }} |
| 99 | + - name: Validate environment |
| 100 | + run: | |
| 101 | + ${{ matrix.py_cmd }} -m pip freeze |
| 102 | + ${{ matrix.py_cmd }} -m pip check |
| 103 | + - name: Validate the install |
| 104 | + run: | |
| 105 | + jupyter labextension list |
| 106 | + jupyter labextension list 2>&1 | grep -ie "@jupyter-notebook/lab-extension.*enabled.*ok" - |
| 107 | + jupyter server extension list |
| 108 | + jupyter server extension list 2>&1 | grep -ie "notebook.*enabled" - |
| 109 | + jupyter notebook --version |
| 110 | + jupyter notebook --help |
0 commit comments