-
Notifications
You must be signed in to change notification settings - Fork 723
63 lines (54 loc) · 1.84 KB
/
python-app.yml
File metadata and controls
63 lines (54 loc) · 1.84 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
# This workflow will install Python dependencies, run tests and lint using uv
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Python application
on:
push:
branches:
- master
pull_request:
schedule:
- cron: '0 12 * * *'
jobs:
test:
name: Run tests on Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- python-version: "3.10"
os: ubuntu-latest
- python-version: "3.11"
os: ubuntu-latest
- python-version: "3.12"
os: ubuntu-latest
- python-version: "3.13"
os: ubuntu-latest
- python-version: "3.14"
os: ubuntu-latest
# Test on additional platforms for Python 3.11
- python-version: "3.11"
os: macos-latest
- python-version: "3.11"
os: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
python-version: ${{ matrix.python-version }}
- name: Install dependencies and run tests
run: uv run --group dev pytest tests/
- name: Run lint (Python 3.11 only)
if: matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'
run: uv run --group dev ruff check sqlparse/
- name: Generate coverage report (Python 3.11 only)
if: matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'
run: |
uv run --group dev coverage run -m pytest tests/
uv run --group dev coverage combine
uv run --group dev coverage xml
- name: Publish to codecov
if: matrix.python-version == '3.11' && matrix.os == 'ubuntu-latest'
uses: codecov/codecov-action@v4