@@ -18,34 +18,10 @@ runs:
1818 shell : bash -l {0}
1919 run : |
2020 set -e
21- micromamba create -n xeus-lite-host jupyterlite-core=0.6 jupyterlite-xeus -c conda-forge -y
2221 micromamba activate xeus-lite-host
23- if [[ "${{ matrix.os }}" == "macos"* ]]; then
24- brew install coreutils
25- export PATH="$HOMEBREW_PREFIX/opt/coreutils/libexec/gnubin:$PATH"
26- fi
27- export INPUT_TEXT=""
2822 if [[ "${{ inputs.notebook }}" == "xeus-cpp-lite-demo.ipynb"* ]]; then
2923 export INPUT_TEXT="--stdin Test_Name"
3024 fi
31- timeout 300 jupyter lite serve --settings-overrides=overrides.json --XeusAddon.prefix=${{ env.PREFIX }} \
32- --XeusAddon.mounts="${{ env.PREFIX }}/share/xeus-cpp/tagfiles:/share/xeus-cpp/tagfiles" \
33- --XeusAddon.mounts="${{ env.PREFIX }}/etc/xeus-cpp/tags.d:/etc/xeus-cpp/tags.d" \
34- --contents README.md \
35- --contents notebooks/xeus-cpp-lite-demo.ipynb \
36- --contents notebooks/images/marie.png \
37- --contents notebooks/audio/audio.wav \
38- --output-dir dist &
39- export jupyter_lite_process_id=$!
40- # There is a bug in nbdime after 3.2.0 where it will show the filenames as if there was a diff
41- # but there is no diff with the options chosen below (the latest doesn't show a diff, just the filenames with +++
42- # and --- as if it was planning to show a diff. This only happens for xeus-cpp-lite-demo.ipynb.
43- python -m pip install nbdime==3.2.0
44- python -m pip install selenium
45- # This sleep is to force enough time for the jupyter site to build before trying
46- # to run notebooks in it. If you try to run the notebooks before the website is
47- # ready the ci python script will crash saying ti cannot access the url
48- sleep 10
4925 echo "Running xeus-cpp in Jupter Lite in Chrome"
5026 python -u scripts/automated-notebook-run-script.py --driver chrome --notebook ${{ inputs.notebook }} --kernel ${{ inputs.kernel }} $INPUT_TEXT
5127 nbdiff notebooks/${{ inputs.notebook }} $HOME/Downloads/${{ inputs.notebook }} --ignore-id --ignore-metadata >> chrome_diff.txt
7854 cat chrome_diff.txt
7955 exit 1
8056 fi
81- # Kill the jupyter lite serve process now we are done running xeus-cpp in the
82- # Jupyter Lite website.
83- pkill -9 timeout
84- pkill -9 jupyter-lite
85- rm -rf ./dist .jupyterlite.doit.db
0 commit comments