From 5075787c26be7342b51e8d71303ce2cd98331f32 Mon Sep 17 00:00:00 2001 From: Hans Then Date: Sat, 9 Aug 2025 16:14:35 +0200 Subject: [PATCH 1/3] Use uv for streamlit_folium installation --- .github/workflows/test_streamlit_folium.yml | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/.github/workflows/test_streamlit_folium.yml b/.github/workflows/test_streamlit_folium.yml index 10ebeb486f..db6e5f7cc7 100644 --- a/.github/workflows/test_streamlit_folium.yml +++ b/.github/workflows/test_streamlit_folium.yml @@ -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: @@ -40,29 +43,23 @@ 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 + uv run playwright install --with-deps - name: Install annotate-failures-plugin - run: pip install pytest-github-actions-annotate-failures coverage + run: uv add pytest-github-actions-annotate-failures --dev - name: Install folium from source run: | - python -m pip install -e . --force-reinstall + 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() @@ -71,7 +68,6 @@ jobs: path: streamlit_folium/test-results.xml fail-on-empty: false - - name: Upload coverage if: always() uses: actions/upload-artifact@v4 From 67c507b6376b045218da636bbb6e91aefe549637 Mon Sep 17 00:00:00 2001 From: Hans Then Date: Sat, 9 Aug 2025 16:41:32 +0200 Subject: [PATCH 2/3] Change working directory --- .github/workflows/test_streamlit_folium.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_streamlit_folium.yml b/.github/workflows/test_streamlit_folium.yml index db6e5f7cc7..2d1a92aebe 100644 --- a/.github/workflows/test_streamlit_folium.yml +++ b/.github/workflows/test_streamlit_folium.yml @@ -47,10 +47,13 @@ jobs: - name: Install playwright dependencies run: | + cd streamlit_folium uv run playwright install --with-deps - name: Install annotate-failures-plugin - run: uv add pytest-github-actions-annotate-failures --dev + run: | + cd streamlit_folium + uv add pytest-github-actions-annotate-failures --dev - name: Install folium from source run: | From 783c28e98442b5bb19459045e77609bddd2fb0d5 Mon Sep 17 00:00:00 2001 From: Hans Then Date: Sun, 10 Aug 2025 12:32:34 +0200 Subject: [PATCH 3/3] Run folium installation from streamlit_folium --- .github/workflows/test_streamlit_folium.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_streamlit_folium.yml b/.github/workflows/test_streamlit_folium.yml index 2d1a92aebe..186bcd7e83 100644 --- a/.github/workflows/test_streamlit_folium.yml +++ b/.github/workflows/test_streamlit_folium.yml @@ -57,7 +57,8 @@ jobs: - name: Install folium from source run: | - uv 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: |