Skip to content

Use uv for streamlit_folium installation #2172

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .github/workflows/test_streamlit_folium.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ jobs:
- name: Checkout Folium
uses: actions/checkout@v4

- name: Install uv
uses: astral-sh/setup-uv@v4

- name: Checkout Streamlit Folium
uses: actions/checkout@v4
with:
Expand All @@ -40,29 +43,27 @@ jobs:
- name: Install streamlit_folium dev dependencies
run: |
cd streamlit_folium
python -m pip install --upgrade pip
pip install -r tests/requirements.txt

- name: Install streamlit-folium
run: |
cd streamlit_folium
pip install -e .
uv sync --group dev --group test

- name: Install playwright dependencies
run: |
playwright install --with-deps
cd streamlit_folium
uv run playwright install --with-deps

- name: Install annotate-failures-plugin
run: pip install pytest-github-actions-annotate-failures coverage
run: |
cd streamlit_folium
uv add pytest-github-actions-annotate-failures --dev

- name: Install folium from source
run: |
python -m pip install -e . --force-reinstall
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
python -m pytest tests/test_frontend.py --browser chromium -s --reruns 3 -k "not test_layer_control_dynamic_update"
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()
Expand All @@ -71,7 +72,6 @@ jobs:
path: streamlit_folium/test-results.xml
fail-on-empty: false


- name: Upload coverage
if: always()
uses: actions/upload-artifact@v4
Expand Down
Loading