Webrtc refactor #77
Workflow file for this run
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: Tests | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
defaults: | |
run: | |
shell: bash -l {0} | |
jobs: | |
tests: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, macos-latest] | |
python-version: [3.9] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install Conda environment with Micromamba | |
uses: mamba-org/provision-with-micromamba@main | |
with: | |
environment-name: ipywebrtc-dev | |
environment-file: dev_environment.yml | |
python-version: ${{ matrix.python-version }} | |
mamba-version: "*" | |
auto-activate-base: false | |
channels: conda-forge | |
- name: Install ipywebrtc | |
run: pip install . | |
- name: Check installation files | |
run: | | |
test -d $CONDA_PREFIX/share/jupyter/nbextensions/jupyter-webrtc | |
test -f $CONDA_PREFIX/share/jupyter/nbextensions/jupyter-webrtc/extension.js | |
test -f $CONDA_PREFIX/share/jupyter/nbextensions/jupyter-webrtc/index.js | |
test -d $CONDA_PREFIX/share/jupyter/labextensions/jupyter-webrtc | |
test -f $CONDA_PREFIX/share/jupyter/labextensions/jupyter-webrtc/package.json | |
- name: Check nbextension and labextension | |
run: | | |
jupyter nbextension list 2>&1 | grep -ie "jupyter-webrtc/extension.*enabled" - | |
jupyter labextension list 2>&1 | grep -ie "jupyter-webrtc.*enabled.*ok" - | |
- name: Run js tests | |
run: | | |
npm install | |
npm run test | |
working-directory: js | |
- name: Run pytest | |
run: | | |
pip install ".[test]" | |
playwright install chromium | |
pytest --no-solara-vuetify-warmup | |
- name: Build docs (Only on MacOS for build speed) | |
if: matrix.os == 'macos-latest' | |
run: | | |
cd docs/source/ | |
sphinx-build . _build/html | |
cd ../.. | |
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: ipywebrtc-dev | |
environment-file: dev_environment.yml | |
python-version: ${{ matrix.python-version }} | |
mamba-version: "*" | |
auto-activate-base: false | |
channels: conda-forge | |
- name: Build packages | |
run: | | |
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: ./dist | |
install: | |
runs-on: ${{ matrix.os }}-latest | |
needs: [build] | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu, macos, windows] | |
python: ["3.6", "3.9"] | |
include: | |
- python: "3.6" | |
dist: "ipywebrtc*.tar.gz" | |
- python: "3.9" | |
dist: "ipywebrtc*.whl" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install Conda environment with Micromamba | |
uses: mamba-org/provision-with-micromamba@main | |
with: | |
environment-name: ipywebrtc-dev | |
environment-file: dev_environment.yml | |
python-version: ${{ matrix.python-version }} | |
mamba-version: "*" | |
auto-activate-base: false | |
channels: conda-forge | |
- uses: actions/download-artifact@v2 | |
with: | |
name: dist ${{ github.run_number }} | |
path: ./dist | |
- name: Install the package | |
run: | | |
cd dist | |
pip install -vv ${{ matrix.dist }} | |
- name: Test installation files | |
run: | | |
test -d $CONDA_PREFIX/share/jupyter/nbextensions/jupyter-webrtc | |
test -f $CONDA_PREFIX/share/jupyter/nbextensions/jupyter-webrtc/extension.js | |
test -f $CONDA_PREFIX/share/jupyter/nbextensions/jupyter-webrtc/index.js | |
test -d $CONDA_PREFIX/share/jupyter/labextensions/jupyter-webrtc | |
test -f $CONDA_PREFIX/share/jupyter/labextensions/jupyter-webrtc/package.json | |
test -d $CONDA_PREFIX/share/jupyter/labextensions/jupyter-webrtc/static | |
- name: Validate the nbextension | |
run: jupyter nbextension list 2>&1 | grep "jupyter-webrtc/extension" | |
- name: Validate the labextension | |
run: jupyter labextension list 2>&1 | grep jupyter-webrtc |