Skip to content

Fix Euler deserialization #93

Fix Euler deserialization

Fix Euler deserialization #93

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
branches: '*'
env:
PIP_DISABLE_PIP_VERSION_CHECK: 1
PYTHONUNBUFFERED: 1
PYTHONIOENCODING: utf-8
CACHE_EPOCH: 0
defaults:
run:
shell: bash -l {0}
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v2
- name: Set up python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Set up node
uses: actions/setup-node@v2
with:
node-version: 14.x
- name: Cache pip packages
uses: actions/cache@v1
with:
path: ~/.cache/pip
key: |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-pip-build-${{ hashFiles('setup.py', 'pyproject.toml') }}
restore-keys: |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-pip-build-
- name: Install installation dependencies
run: |
set -eux
python -m pip install -vv -U --user pip wheel setuptools
yarn --version || npm install -g yarn
- name: Install packaging dependencies
run: |
set -eux
python -m pip install -vv 'jupyterlab~=3.0'
- name: Pre-install node dependencies
run: |
set -eux
cd js
yarn --ignore-optional
- name: Build sdist
run: python setup.py sdist
- name: Build wheel
run: python setup.py bdist_wheel
- name: Collect and hash distributions
run: |
set -eux
cp js/lab-dist/jupyter-threejs-*.tgz dist
cd dist
sha256sum * | tee SHA256SUMS
- name: Upload distributions
uses: actions/upload-artifact@v2
with:
name: dist ${{ github.run_number }}
path: ./dist
docs:
name: docs
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v2
- name: Install apt dependencies
run: |
set -eux
sudo apt install pandoc
- name: Set up python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install installation dependencies
run: |
set -eux
python -m pip install -vv -U --user pip wheel setuptools
- name: Set up node
uses: actions/setup-node@v2
with:
node-version: 14.x
- name: Install package and docs dependencies
run: |
set -eux
pip install -vv -U -e .[docs,examples,test] requests_cache
- name: Validate docs environment
run: |
set -eux
pip freeze
pip check
- name: Build docs
run: |
set -eux
cd docs
make html
- name: Upload docs
uses: actions/upload-artifact@v2
with:
name: docs ${{ github.run_number }}
path: ./docs/build
- name: Get current date
id: date
run: |
echo "::set-output name=year::$(date +'%Y')"
echo "::set-output name=week::$(date +'%U')"
- name: Cache links
uses: actions/cache@v1
with:
path: ./build/links
key: |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-links-${{ steps.date.outputs.year }}-${{ steps.date.outputs.week }}
restore-keys: |
${{ env.CACHE_EPOCH }}-${{ runner.os }}-links-${{ steps.date.outputs.year }}-
${{ env.CACHE_EPOCH }}-${{ runner.os }}-links-
- name: Check links
run: |
set -eux
mkdir -p build/links/cache
pytest-check-links --check-links-cache --check-links-cache-name ./build/links/cache
test:
name: test ${{ matrix.os }}${{ matrix.python }} ${{ matrix.node }} ${{ matrix.lab }}
needs: [build]
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
python: [3.7, 3.8, 3.9, 3.10]
include:
- python: 3.7
dist: 'pythreejs*.tar.gz'
node: 14
lab: 2
- python: 3.8
dist: 'pythreejs*.whl'
node: 14
lab: 2
- python: 3.9
node: 16
dist: 'pythreejs*.whl'
lab: 3
- python: 3.10
dist: 'pythreejs*.whl'
lab: 3
- os: windows
py_cmd: python
- os: macos
py_cmd: python3
- os: ubuntu
py_cmd: python
steps:
- name: Check out
uses: actions/checkout@v2
- name: Set up python
uses: actions/setup-python@v2
with:
python-version: 3.8
- if: ${{ matrix.node }}
name: Set up node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
- name: Download distributions
uses: actions/download-artifact@v2
with:
name: dist ${{ github.run_number }}
path: ./dist
- name: Install installation dependencies
run: |
set -eux
${{ matrix.py_cmd }} -m pip install -vv --user -U pip wheel setuptools
- name: Install package
run: |
set -eux
cd dist
${{ matrix.py_cmd }} -m pip install -vv ${{ matrix.dist }}
- name: Validate environment
run: |
set -eux
${{ matrix.py_cmd }} -m pip freeze
${{ matrix.py_cmd }} -m pip check
- if: ${{ matrix.lab }}
name: Install JupyterLab
run: |
set -eux
${{ matrix.py_cmd }} -m pip install -vv 'jupyterlab==${{ matrix.lab }}.*'
- name: Install test dependencies
# explicit file installs don't support extras, skimage brings most along
run: |
set -eux
${{ matrix.py_cmd }} -m pip install -vv nbval scikit-image ipywebrtc pytest-cov codecov matplotlib
- name: Run python tests
# remove the source directory to avoid surprises
run: |
set -eux
rm -rf pythreejs
${{ matrix.py_cmd }} -m pytest -vv -l --nbval-lax --current-env . --cov pythreejs --cov-report term-missing:skip-covered --no-cov-on-fail
- name: Upload coverage
run: |
set -eux
codecov
- name: Check notebook extension
run: |
set -eux
jupyter nbextension list
jupyter nbextension list 2>&1 | grep -ie "jupyter-threejs/extension.*enabled" -
- if: ${{ matrix.node }}
name: Install lab extension
run: |
set -eux
jupyter labextension install --no-build --debug ./dist/*.tgz @jupyter-widgets/jupyterlab-manager
- if: ${{ matrix.node }}
name: Build lab
run: |
set -eux
jupyter lab build --debug
- if: ${{ matrix.lab }}
name: Check lab extension
run: |
set -eux
jupyter labextension list
jupyter labextension list 2>&1 | grep -ie "jupyter-threejs.*enabled.*ok" -