forked from jupyterlab/jupyterlab
/
travis_script.sh
94 lines (75 loc) · 2.4 KB
/
travis_script.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
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
#!/bin/bash
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
set -ex
export DISPLAY=:99.0
sh -e /etc/init.d/xvfb start || true
export PATH="$HOME/miniconda/bin:$PATH"
if [[ $GROUP == tests ]]; then
# Run the JS and python tests
py.test
npm run clean
npm run build:src
npm run build:test
npm test
npm run test:services || npm run test:services
# Make sure we have CSS that can be converted with postcss
npm install -g postcss-cli
postcss jupyterlab/build/*.css > /dev/null
# Run the publish script in jupyterlab
cd jupyterlab
npm run publish
if [ ! -f ./build/release_data.json ]; then
echo "npm publish in jupyterlab unsucessful!"
fi
fi
if [[ $GROUP == coverage_and_docs ]]; then
# Run the coverage and python tests.
py.test
npm run build
npm run build:test
npm run coverage
# Run the link check
pip install -q pytest-check-links
py.test --check-links -k .md .
# Build the api docs
npm run docs
cp jupyter_plugins.png docs
# Verify tutorial docs build
pushd docs
conda env create -n test_docs -f environment.yml
source activate test_docs
make html
source deactivate
popd
fi
if [[ $GROUP == cli ]]; then
# Make sure we can successfully load the core app.
pip install selenium
python -m jupyterlab.selenium_check --core-mode
# Make sure we can build and run the app.
jupyter lab build
python -m jupyterlab.selenium_check
jupyter labextension list
# Test the cli apps.
jupyter lab clean
jupyter lab build
jupyter lab path
jupyter labextension link jupyterlab/tests/mockextension --no-build
jupyter labextension unlink jupyterlab/tests/mockextension --no-build
jupyter labextension link jupyterlab/tests/mockextension --no-build
jupyter labextension unlink @jupyterlab/python-tests --no-build
jupyter labextension install jupyterlab/tests/mockextension --no-build
jupyter labextension list
jupyter labextension uninstall @jupyterlab/python-tests
# Make sure we can call help on all the cli apps.
jupyter lab -h
jupyter lab build -h
jupyter lab clean -h
jupyter lab path -h
jupyter labextension link -h
jupyter labextension unlink -h
jupyter labextension install -h
jupyter labextension uninstall -h
jupyter labextension list -h
fi