@@ -43,61 +43,71 @@ jobs:
4343
4444 steps :
4545 - uses : actions/checkout@v3
46+
4647 - uses : actions/setup-python@v4
4748 with :
4849 python-version : " ${{ matrix.python-version }}"
4950
51+ - uses : actions/setup-node@v3
52+ with :
53+ cache : yarn
54+ node-version : 18.x
55+ registry-url : https://registry.npmjs.org
56+ cache-dependency-path : labextension/yarn.lock
57+
58+ - name : Update root build packages
59+ run : |
60+ pip install --upgrade build pip
61+
5062 - name : Build Python package
5163 run : |
52- pip install jupyter_packaging wheel jupyterlab
53- python setup.py sdist bdist_wheel
64+ pyproject-build
5465
55- - name : Install Python dependencies
66+ - name : Install Python package
5667 # NOTE: See CONTRIBUTING.md for a local development setup that differs
5768 # slightly from this.
5869 #
5970 # Pytest options are set in tests/pytest.ini.
6071 run : |
61- pip install --upgrade pip
62- pip install jupyter_packaging jupyterlab~=${{ matrix.jupyterlab-version }}.0
63- pip install ./dist/jupyter_server_proxy-*.whl
64- pip install pytest pytest-cov pytest-html
65- # Ensure we don't accidentally depend on notebook
66- if [ "${{ matrix.jupyter-app }}" == "notebook" ]; then
67- pip install "notebook<7"
68- fi
72+ pip install -vv $(ls ./dist/jupyter_server_proxy-*.whl)\[acceptance\] 'jupyterlab~=${{ matrix.jupyterlab-version }}.0'
73+
74+ - name : List Python packages
75+ run : |
6976 pip freeze
77+ pip check
7078
7179 - name : Run tests
7280 run : |
7381 JUPYTER_TOKEN=secret jupyter-${{ matrix.jupyter-app }} --config=./tests/resources/jupyter_server_config.py &
7482 sleep 5
7583 cd tests
76- pytest
84+ pytest -k "not acceptance"
7785
7886 - name : Upload pytest and coverage reports
7987 if : always()
8088 uses : actions/upload-artifact@v3
8189 with :
82- name : unit-tests-${{ matrix.python-version }}-${{ matrix.jupyter-app }}-${{ matrix.jupyterlab-version }}-${{ github.run_number }}
90+ name : |-
91+ unit-tests-${{ matrix.python-version }}-${{ matrix.jupyter-app }}-${{ matrix.jupyterlab-version }}-${{ github.run_number }}
8392 path : |
8493 ./build/pytest
8594 ./build/coverage
8695
8796 - name : Check the Notebook Server extension is installed
8897 run : |
8998 jupyter serverextension list
90- jupyter serverextension list 2>&1 | grep -ie "jupyter_server_proxy.*enabled " -
99+ jupyter serverextension list 2>&1 | grep -iE "jupyter_server_proxy.*OK " -
91100
92101 - name : Check the Jupyter Server extension is installed
93102 run : |
94103 pip install jupyter-server
95104 jupyter server extension list
96- jupyter server extension list 2>&1 | grep -ie "jupyter_server_proxy.*enabled " -
105+ jupyter server extension list 2>&1 | grep -iE "jupyter_server_proxy.*OK " -
97106
98107 - name : Install JupyterLab Extension
99108 if : matrix.jupyterlab-version == '2'
100109 run : |
110+ export NODE_OPTIONS=--openssl-legacy-provider
101111 cd labextension
102112 jupyter labextension install . --no-build --debug
103113 jupyter lab build --minimize=False --debug
@@ -108,25 +118,21 @@ jobs:
108118 # jupyterlab.browser_check with jupyterlab 2 and a modern version of
109119 # python (3.11+).
110120 #
111- if : ${{ !(matrix.jupyterlab-version == '2' && startsWith(matrix.python-version, '3.1 ')) }}
121+ if : ${{ !(matrix.jupyterlab-version == '2' && startsWith(matrix.python-version, '3.11 ')) }}
112122 run : |
113123 jupyter labextension list
114- jupyter labextension list 2>&1 | grep -ie '@jupyterhub/jupyter-server-proxy.*OK.*'
124+ jupyter labextension list 2>&1 | grep -iE '@jupyterhub/jupyter-server-proxy.*OK.*'
115125 python -m jupyterlab.browser_check
116126
117- - name : Install Acceptance test dependencies
118- run : |
119- # the acceptance test requires notebook to run
120- pip install "notebook<7" "robotframework-jupyterlibrary>=0.4.2"
121-
122127 - name : Run acceptance tests
123128 run : |
124- pytest -k acceptance -s
129+ pytest -s -k " acceptance"
125130
126131 - name : Upload acceptance test reports
127132 if : always()
128133 uses : actions/upload-artifact@v3
129134 with :
130- name : acceptance-tests-${{ matrix.python-version }}-${{ matrix.jupyter-app }}-${{ matrix.jupyterlab-version }}-${{ github.run_number }}
135+ name : |-
136+ acceptance-tests-${{ matrix.python-version }}-${{ matrix.jupyter-app }}-${{ matrix.jupyterlab-version }}-${{ github.run_number }}
131137 path : |
132138 ./build/robot
0 commit comments