Skip to content

Add ui-tests

Add ui-tests #41

Workflow file for this run

name: Build
on:
push:
branches: main
pull_request:
branches: "*"
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.8", "3.12"]
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- name: Install build dependencies
run: python -m pip install build jupyterlab=4
- name: Install yarn dependencies
run: yarn run build
- name: Linting
run: yarn run lint:check
- name: Build Python package
run: python -m build
- name: Upload builds
uses: actions/upload-artifact@v3
with:
name: dist ${{ github.run_number }}
path: ./dist
visual-regression-tests:
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: jupyterlab/maintainer-tools/.github/actions/base-setup@v1
- uses: actions/download-artifact@v3
with:
name: dist ${{ github.run_number }}
path: ./dist
- name: Install the package
run: pip install -vv ipyopenlayers*.whl
working-directory: dist
- name: Install dependencies
shell: bash -l {0}
working-directory: ui-tests
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
run: jlpm install
- name: Install browser
shell: bash -l {0}
run: npx playwright install chromium
working-directory: ui-tests
- name: Execute integration tests
shell: bash -l {0}
working-directory: ui-tests
run: jlpm run test
- name: Upload Playwright Test report
if: always()
uses: actions/upload-artifact@v3
with:
name: ipyopenlayers-playwright-tests
path: |
ui-tests/test-results
ui-tests/playwright-report