Fix JupyterLab 3 support (#100) #202
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Conda package (Ubuntu Lab2 and Lab3) | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
defaults: | |
run: | |
shell: bash -l {0} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install Conda environment with Micromamba | |
uses: mamba-org/provision-with-micromamba@main | |
with: | |
environment-name: beakerx_tabledisplay | |
environment-file: configuration.yml | |
channels: conda-forge | |
- name: Build BeakerX tabledisplay | |
run: (cd beakerx_tabledisplay; pip install .) | |
- name: Check installation files (nbextension and lab3 extension) | |
run: | | |
test -d $CONDA_PREFIX/share/jupyter/nbextensions/beakerx_tabledisplay | |
test -f $CONDA_PREFIX/share/jupyter/nbextensions/beakerx_tabledisplay/extension.js | |
test -f $CONDA_PREFIX/share/jupyter/nbextensions/beakerx_tabledisplay/index.js | |
test -d $CONDA_PREFIX/share/jupyter/labextensions/@beakerx/beakerx-tabledisplay | |
test -f $CONDA_PREFIX/share/jupyter/labextensions/@beakerx/beakerx-tabledisplay/package.json | |
- name: Build wheel | |
run: | | |
cd beakerx_tabledisplay | |
python setup.py sdist bdist_wheel | |
cd dist | |
sha256sum * | tee SHA256SUMS | |
- name: Upload builds | |
uses: actions/upload-artifact@v2 | |
with: | |
name: dist ${{ github.run_number }} | |
path: ./beakerx_tabledisplay/dist | |
tests: | |
runs-on: ubuntu-latest | |
needs: [build] | |
strategy: | |
fail-fast: false | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Checkout beakerx_base repo | |
uses: actions/checkout@v2 | |
with: | |
repository: twosigma/beakerx_base | |
path: beakerx_base | |
- name: Checkout beakerx_tests repo | |
uses: actions/checkout@v2 | |
with: | |
repository: twosigma/beakerx_tests | |
path: beakerx_tests | |
- uses: actions/download-artifact@v2 | |
with: | |
name: dist ${{ github.run_number }} | |
path: ./dist | |
- name: Install Conda environment with Micromamba | |
uses: mamba-org/provision-with-micromamba@main | |
with: | |
environment-name: beakerx_tabledisplay | |
environment-file: configuration.yml | |
channels: conda-forge | |
- name: Install the wheel | |
run: | | |
cd dist | |
pip install -vv beakerx_tabledisplay*.whl | |
- name: Check installation files (nbextension and lab extension) | |
run: | | |
test -d $CONDA_PREFIX/share/jupyter/nbextensions/beakerx_tabledisplay | |
test -f $CONDA_PREFIX/share/jupyter/nbextensions/beakerx_tabledisplay/extension.js | |
test -f $CONDA_PREFIX/share/jupyter/nbextensions/beakerx_tabledisplay/index.js | |
test -d $CONDA_PREFIX/share/jupyter/labextensions/@beakerx/beakerx-tabledisplay | |
test -f $CONDA_PREFIX/share/jupyter/labextensions/@beakerx/beakerx-tabledisplay/package.json | |
- name: Check nbextension and labextension | |
run: | | |
jupyter labextension list 2>&1 | grep -ie "@beakerx/beakerx-tabledisplay.*enabled.*ok" - | |
- name: Run e2e tests (table v1) | |
shell: bash -l {0} | |
run: | | |
cd $GITHUB_WORKSPACE/beakerx_tests/autotests | |
chmod +x gradlew | |
pip install psutil | |
python ci_tests.py --app=lab --tbl=v1 --exp=yes --tst=python.Table* | |
- name: Archive screenshot results | |
uses: actions/upload-artifact@v1 | |
if: always() | |
with: | |
name: screenshots | |
path: ${{ github.workspace }}/beakerx_tests/autotests/resources/img/python |