-
Notifications
You must be signed in to change notification settings - Fork 2.3k
72 lines (61 loc) · 1.82 KB
/
Copy pathtest_snapshots.yml
File metadata and controls
72 lines (61 loc) · 1.82 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
65
66
67
68
69
70
71
72
name: Run Snapshot Tests
# no permissions by default
permissions: {}
on:
pull_request:
push:
branches:
- main
jobs:
run:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
permissions:
actions: write
steps:
- name: Checkout Folium
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Micromamba env
uses: mamba-org/setup-micromamba@ce51e99f4bb8a82ab7158c4dc59ef4634c59c4f9 # v3.1.0
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@fdc7f18d9934e38aca411ca9557e6577bd25ca9c # v0.9.0
with:
path: test-results.xml
fail-on-empty: false
- name: Upload screenshots
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: screenshots
path: |
/tmp/screenshot_*_*.png
/tmp/folium_map_*.html
- name: Upload coverage
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: coverage-test-snapshots
path: |
.coverage*
include-hidden-files: true