Skip to content

Build with lab 4

Build with lab 4 #85

Workflow file for this run

name: UI Tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
ui-tests:
name: Visual Regression
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.9]
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Base Setup
uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Install ipyflex
run: |
python -m pip install --upgrade jupyterlab~=4.0 ipywidgets jupyter_packaging~=0.10
python -m pip install .
cd ui-tests
jlpm install
- name: Install browser
run: |
cd ui-tests
jlpm playwright install chromium
- name: Launch JupyterLab
run: |
cd ui-tests
jlpm start:detached > /tmp/jupyterlab_server.log 2>&1
- name: Wait for JupyterLab
uses: ifaxity/wait-on-action@v1
with:
resource: http-get://localhost:8888/
timeout: 360000
- name: Widget rendering tests
shell: bash
run: |
cd ui-tests
jlpm run test
- name: Upload Playwright Test assets
if: always()
uses: actions/upload-artifact@v4
with:
name: ipyflex-test-assets
path: |
ui-tests/test-results
- name: Upload Playwright Test report
if: always()
uses: actions/upload-artifact@v4
with:
name: ipyflex-test-report
path: |
ui-tests/playwright-report
- name: Update snapshots
if: failure()
run: |
cd ui-tests
# remove previous snapshots from other browser
jlpm rimraf "tests/**/*-snapshots/*.png"
# generate new snapshots
jlpm run test:update
- name: Upload snapshots
if: failure()
uses: actions/upload-artifact@v4
with:
name: ipyflex-snapshot
path: |
ui-tests/tests
- name: Print JupyterLab logs
if: always()
run: |
cat /tmp/jupyterlab_server.log