forked from jupyter-widgets/ipyleaflet
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (52 loc) · 1.53 KB
/
ui-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: UI Tests
on: [push, pull_request]
defaults:
run:
shell: bash -l {0}
jobs:
ui-tests:
name: Visual Regression
runs-on: ubuntu-latest
strategy:
matrix:
python: [3.8]
fail-fast: false
steps:
- uses: actions/checkout@v2
- name: Install Conda environment with Micromamba
uses: mamba-org/setup-micromamba@main
with:
environment-file: environment-dev.yml
channels: conda-forge
- name: Install ipyleaflet
run: pip install python/jupyter_leaflet python/ipyleaflet_core python/ipyleaflet --no-deps
- name: Install browser
run: |
jlpm install
npx playwright install chromium
working-directory: ui-tests
- name: Widget rendering tests
run: npx playwright test
working-directory: ui-tests
- name: Upload Playwright Test assets
if: always()
uses: actions/upload-artifact@v2
with:
name: ipyleaflet-test-assets
path: |
ui-tests/test-results
- name: Upload Playwright Test report
if: always()
uses: actions/upload-artifact@v2
with:
name: ipyleaflet-test-report
path: |
ui-tests/playwright-report
- name: Update snapshots
if: failure()
run: |
# remove previous snapshots from other browser
jlpm rimraf "tests/**/*-snapshots/*.png"
# generate new snapshots
jlpm run test:update
working-directory: ui-tests