File: release_test.sh

package info (click to toggle)
jupyterlab 4.0.11%2Bds1%2B~cs11.25.27-7
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 43,496 kB
  • sloc: javascript: 18,395; python: 8,932; sh: 399; makefile: 95; perl: 33; xml: 1
file content (61 lines) | stat: -rwxr-xr-x 1,872 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/env bash
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.


# Test a release wheel in a fresh conda environment with and without installed
# extensions

# initialize the shell
set -ex
. $(conda info --base)/etc/profile.d/conda.sh

OUTPUT_DIR=$(pwd)/build/${GROUP}_output

JLAB_TEST_ENV="${CONDA_DEFAULT_ENV}_test"
TEST_DIR=$(mktemp -d -t ${JLAB_TEST_ENV}XXXXX)

conda create --override-channels --strict-channel-priority -c conda-forge -c nodefaults -y -n "$JLAB_TEST_ENV" 'nodejs>=10,!=13.*,!=15.*,!=17.*' 'python!=3.10.0' pip wheel setuptools
conda activate "$JLAB_TEST_ENV"

python -m pip install $(ls dist/*.whl)

cp examples/notebooks/*.ipynb $TEST_DIR/
cp -r jupyterlab/tests/mock_packages $TEST_DIR
pushd $TEST_DIR

ls -ltr

JLAB_BROWSER_CHECK_OUTPUT=${OUTPUT_DIR} python -m jupyterlab.browser_check

# Remove node_modules to get a clean directory and build the extensions
rm -rf ./mock_packages/mimeextension/node_modules
rm -rf ./mock_packages/extension/node_modules

export YARN_NPM_REGISTRY_SERVER="http://0.0.0.0:4873"
jupyter labextension install ./mock_packages/mimeextension --no-build --debug
jupyter labextension develop ./mock_packages/extension --debug
jupyter labextension build ./mock_packages/extension --debug

conda install --override-channels --strict-channel-priority -c conda-forge -c nodefaults -y ipywidgets altair matplotlib-base vega_datasets jupyterlab_widgets

popd

# re-install, because pip
python -m pip install $(ls dist/*.whl)

# back to testing
pushd $TEST_DIR

jupyter lab build --debug

JLAB_BROWSER_CHECK_OUTPUT=${OUTPUT_DIR} python -m jupyterlab.browser_check

# if not running on github actions, start JupyterLab
if [[ -z "${GITHUB_ACTIONS}" ]]; then
    jupyter lab
fi

# undo our environment changes just in case we are sourcing this script
conda deactivate
popd