-
Notifications
You must be signed in to change notification settings - Fork 32
84 lines (69 loc) · 1.78 KB
/
tests.yml
File metadata and controls
84 lines (69 loc) · 1.78 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
---
name: Tests
on:
push:
branches:
- main
pull_request: ~
workflow_dispatch:
schedule:
- cron: '0 2 * * *'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
checks: write
statuses: write
jobs:
test:
name: "Python: ${{ matrix.python-version }}
on ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-24.04"]
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
# To save resources, only verify other variants particularly.
include:
# Linux/ARM
- os: 'ubuntu-24.04-arm'
python-version: '3.14'
# macOS/Intel
- os: 'macos-15-intel'
python-version: '3.14'
# macOS/ARM
- os: 'macos-latest'
python-version: '3.14'
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
cache-suffix: ${{ matrix.python-version }}
enable-cache: true
activate-environment: true
version: "latest"
- name: Setup env
run: uv pip install --group dev -e .
- name: Run Linters
run: |
ruff check .
mypy
- name: Run tests
run: |
coverage run -m pytest
coverage combine
coverage xml
- name: Upload coverage results to Codecov
uses: codecov/codecov-action@v5
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
fail_ci_if_error: true