-
Notifications
You must be signed in to change notification settings - Fork 11
77 lines (65 loc) · 1.85 KB
/
Copy pathmain.yml
File metadata and controls
77 lines (65 loc) · 1.85 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
name: Tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
name: Run tests with ${{ matrix.python-version }}${{ matrix.with-psutil && ' (and psutil)' || '' }}
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13', '3.13t', '3.14', '3.14t', '3.15-dev', '3.15t-dev']
with-psutil: [false]
include:
- python-version: '3.14t'
with-psutil: true
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Setup uv
uses: astral-sh/setup-uv@v7
with:
activate-environment: true
- name: Install dependencies
run: |
uv sync --locked --group test
- name: Install psutil (if needed)
if: matrix.with-psutil
run: |
uv pip install psutil
- name: Run tests with coverage
run: |
coverage run
- name: Show coverage results
run: |
coverage report -m
- name: Check manifest
run: |
check-manifest -u -v
test-single-cpu:
runs-on: ubuntu-latest
name: Run tests on a simulated single-CPU system
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: '3.14'
- name: Setup uv
uses: astral-sh/setup-uv@v7
with:
activate-environment: true
- name: Install dependencies
run: |
uv sync --locked --group test
- name: Run tests pinned to a single CPU
# Regression coverage for issue #177: --parallel-threads=auto must
# degrade gracefully when only one CPU is available.
run: |
taskset -c 0 python -m pytest tests/