tests: use solara/pytest-ipywidgets to test image and contour #48
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: CI Tests | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- '*' | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install twine wheel jupyter-packaging jupyterlab | |
- name: Build | |
run: | | |
python setup.py sdist bdist_wheel | |
- name: Upload builds | |
uses: actions/upload-artifact@v3 | |
with: | |
name: bqplot-image-gl-dist-${{ github.run_number }} | |
path: ./dist | |
visual-regression-tests: | |
runs-on: ubuntu-latest | |
needs: [build] | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/download-artifact@v3 | |
with: | |
name: bqplot-image-gl-dist-${{ github.run_number }} | |
path: ./dist | |
- name: Install node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '18.x' | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Install bqplot-image-gl and jupyterlab | |
run: | | |
echo $PWD | |
ls -al . | |
ls -al dist/ | |
pip install dist/bqplot_image_gl*.whl jupyterlab "pytest-ipywidgets[solara]" | |
- name: Run visual regression tests | |
run: | | |
pytest tests/ui | |
- name: Install Galata | |
run: | | |
yarn install | |
yarn playwright install chromium | |
working-directory: ui-tests | |
- name: Launch JupyterLab | |
run: yarn run start:detached | |
working-directory: ui-tests | |
- name: Wait for JupyterLab | |
uses: ifaxity/wait-on-action@v1 | |
with: | |
resource: http-get://localhost:8988/api | |
timeout: 20000 | |
- name: Run UI Tests | |
env: | |
TARGET_URL: http://127.0.0.1:8988 | |
run: yarn run test | |
working-directory: ui-tests | |
- name: Upload UI Test artifacts | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ui-test-output | |
path: | | |
ui-tests/playwright-report | |
ui-tests/test-results | |
tests: | |
uses: OpenAstronomy/github-actions-workflows/.github/workflows/tox.yml@v1 | |
with: | |
coverage: codecov | |
envs: | | |
# Code style | |
- linux: codestyle | |
coverage: false | |
- linux: py36-test | |
- linux: py38-test | |
- macos: py37-test | |
- macos: py310-test | |
- windows: py36-test | |
- windows: py39-test | |
- linux: py38-notebooks | |
- macos: py37-notebooks | |
- windows: py39-notebooks |