Repository navigation
93 lines (91 loc) · 3.09 KB
/
Copy pathtests.yaml
File metadata and controls
93 lines (91 loc) · 3.09 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
83
84
85
86
87
88
89
90
91
92
93
name: Tests
on:
push:
branches:
- main
- '*.x'
paths-ignore:
- 'docs/**'
- '*.md'
- '*.rst'
pull_request:
paths-ignore:
- 'docs/**'
- '*.md'
- '*.rst'
jobs:
tests:
name: ${{ matrix.name || matrix.python }}
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
strategy:
fail-fast: false
matrix:
include:
- {python: '3.15'}
- {python: '3.14'}
- {python: '3.13'}
- {python: '3.12'}
- {python: '3.11'}
- {python: 'pypy3.11'}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install uv
uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
with:
enable-cache: true
- name: Set up Python ${{ matrix.python }}
run: uv python install ${{ matrix.python }}
- name: Run tests
run: uv run --python ${{ matrix.python }} --group dev pytest --tb=short -l
minversions:
name: minversions
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install uv
uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
with:
enable-cache: true
- name: Set up Python 3.11
run: uv python install 3.11
- name: Run tests with lowest-direct resolution
run: uv run --python 3.11 --resolution lowest-direct --group dev pytest --tb=short -l
downstream-tests:
name: py${{ matrix.python }} ${{ matrix.downstream }} downstream
runs-on: ubuntu-latest
continue-on-error: true
strategy:
fail-fast: false
matrix:
python: ['3.11', '3.12', '3.13', '3.14', '3.15']
downstream:
- pallets-eco/flask-wtf
- pallets-eco/wtforms-sqlalchemy
steps:
- name: Checkout wtforms
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
path: wtforms
- name: Checkout ${{ matrix.downstream }}
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
repository: ${{ matrix.downstream }}
path: ${{ matrix.downstream }}
- name: Install uv
uses: astral-sh/setup-uv@07a047e608db84b3d8c06cd9a7c7dcc9c355c18e # v10.3.2
with:
enable-cache: true
cache-dependency-glob: ${{ matrix.downstream }}/pyproject.toml
- name: Install Python ${{ matrix.python }}
run: uv python install ${{ matrix.python }}
- name: Install downstream test environment
working-directory: ${{ matrix.downstream }}
run: |
uv sync --python ${{ matrix.python }} --all-groups --all-extras
uv pip install --force-reinstall ../../wtforms
- name: Run downstream tests
working-directory: ${{ matrix.downstream }}
run: uv run --no-sync pytest -W default
- name: Emit warning on failure
if: failure()
run: echo "::warning::${{ matrix.downstream }} tests failed on Python ${{ matrix.python }}"