-
Notifications
You must be signed in to change notification settings - Fork 2.3k
82 lines (68 loc) · 1.96 KB
/
test_streamlit_folium.yml
File metadata and controls
82 lines (68 loc) · 1.96 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
73
74
75
76
77
78
79
80
81
82
name: Run Streamlit Folium Tests
on:
schedule:
- cron: "0 13 * * *"
pull_request:
push:
branches:
- main
jobs:
run:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
steps:
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.13'
- name: Checkout Folium
uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v7
- name: Checkout Streamlit Folium
uses: actions/checkout@v6
with:
repository: randyzwitch/streamlit-folium
ref: master
path: streamlit_folium # Checkout into a subdirectory
- name: Build streamlit_folium javascript
run: |
cd streamlit_folium/streamlit_folium/frontend/
npm install
npm run build
- name: Install streamlit_folium dev dependencies
run: |
cd streamlit_folium
sudo apt-get install proj-bin
uv sync --group dev --group test
- name: Install playwright dependencies
run: |
cd streamlit_folium
uv run playwright install --with-deps
- name: Install annotate-failures-plugin
run: |
cd streamlit_folium
uv add pytest-github-actions-annotate-failures --dev
- name: Install folium from source
run: |
cd streamlit_folium
uv pip install -e .. --force-reinstall
- name: Test with pytest and retry flaky tests up to 3 times
run: |
cd streamlit_folium
uv run pytest tests/test_frontend.py --browser chromium -s --reruns 3 -k "not test_layer_control_dynamic_update"
- name: Surface failing tests
if: always()
uses: pmeier/pytest-results-action@main
with:
path: streamlit_folium/test-results.xml
fail-on-empty: false
- name: Upload coverage
if: always()
uses: actions/upload-artifact@v7
with:
name: coverage-test-streamlit-folium
path: |
.coverage*