-
-
Notifications
You must be signed in to change notification settings - Fork 224
65 lines (56 loc) · 1.73 KB
/
Copy pathrun_tests_each_PR.yml
File metadata and controls
65 lines (56 loc) · 1.73 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
# This workflow will install Python dependencies and run tests with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Run tests each PR
on:
schedule:
- cron: "0 0 * * 0"
push:
branches: [master]
pull_request:
branches: [master]
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ matrix.python-version }}
- uses: actions/setup-node@v4
with:
node-version: 24
- name: build streamlit-folium JS
run: |
cd streamlit_folium/frontend/
npm install
npm run build
- name: Install python dependencies
run: |
uv sync --group dev --group test
- name: Install playwright dependencies
run: |
uv run playwright install --with-deps
- name: Install annotate-failures-plugin
run: uv add pytest-github-actions-annotate-failures --dev
- name: Test with pytest and retry flaky tests up to 3 times
run: |
uv run pytest --browser chromium -s --reruns 3 --junit-xml=test-results.xml
- name: Surface failing tests
if: always()
uses: pmeier/pytest-results-action@main
with:
path: test-results.xml
fail-on-empty: false
- uses: actions/upload-artifact@v4
if: failure()
with:
name: screenshots
path: screenshot*.png