forked from telamonian/theme-darcula
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.ci_funcs.sh
35 lines (27 loc) · 1.07 KB
/
.ci_funcs.sh
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
#!/bin/bash
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
set -ex
set -o pipefail
ci_install() {
# Install JupyterLab
pip install -q --upgrade pip
pip --version
pip install --upgrade --upgrade-strategy=eager "jupyterlab~=3.0"
}
ci_script() {
# Build and install this theme extension
python -m pip install .
# print out a confirmation that the extension is installed
jupyter labextension list
# directly check for this specific labextension
jupyter labextension list 2>&1 | grep -ie "@telamonian/theme-darcula.*OK"
# set a custom user-settings directory
export JUPYTERLAB_SETTINGS_DIR="./.jupyter/lab/user-settings"
THEME_SETTINGS="${JUPYTERLAB_SETTINGS_DIR}/@jupyterlab/apputils-extension/themes.jupyterlab-settings"
# enable the theme in user-settings
mkdir -p $(dirname $THEME_SETTINGS)
printf "%s\n" "{" " \"theme\": \"Darcula\"" "}" > $THEME_SETTINGS
# run a test of the main JupyterLab app with the theme enabled
python -m jupyterlab.browser_check
}