Skip to content

Add zizmor checks and fix all lints #842

Add zizmor checks and fix all lints

Add zizmor checks and fix all lints #842

name: Run Streamlit Folium Tests
# no permissions by default
permissions: {}
on:
schedule:
- cron: "0 13 * * *"
pull_request:
push:
branches:
- main
jobs:
run:
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
permissions:
actions: write
steps:
- name: Set up Python
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with:
python-version: "3.14"
- name: Checkout Folium
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2
- name: Checkout Streamlit Folium
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 0
persist-credentials: false
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@fdc7f18d9934e38aca411ca9557e6577bd25ca9c # v0.9.0
with:
path: streamlit_folium/test-results.xml
fail-on-empty: false
- name: Upload coverage
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: coverage-test-streamlit-folium
path: |
.coverage*