-
Notifications
You must be signed in to change notification settings - Fork 2.3k
64 lines (54 loc) · 1.44 KB
/
test_snapshots.yml
File metadata and controls
64 lines (54 loc) · 1.44 KB
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
64
name: Run Snapshot Tests
on:
pull_request:
push:
branches:
- main
jobs:
run:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Checkout Folium
uses: actions/checkout@v6
- name: Setup Micromamba env
uses: mamba-org/setup-micromamba@v3
with:
environment-name: TEST
create-args: >-
python=3
--file requirements.txt
--file requirements-dev.txt
- name: Install pytest plugins and pixelmatch
run: |
pip install pixelmatch pytest-github-actions-annotate-failures pytest-rerunfailures
- name: Install folium from source
run: |
python -m pip install -e . --no-deps --force-reinstall
- name: Test with pytest
run: |
coverage run -p -m pytest tests/snapshots -s --junit-xml=test-results.xml
- name: Surface failing tests
if: always()
uses: pmeier/pytest-results-action@main
with:
path: test-results.xml
fail-on-empty: false
- name: Upload screenshots
if: failure()
uses: actions/upload-artifact@v7
with:
name: screenshots
path: |
/tmp/screenshot_*_*.png
/tmp/folium_map_*.html
- name: Upload coverage
if: always()
uses: actions/upload-artifact@v7
with:
name: coverage-test-snapshots
path: |
.coverage*
include-hidden-files: true