-
Notifications
You must be signed in to change notification settings - Fork 2
77 lines (62 loc) · 2.17 KB
/
Copy pathci-tests.yaml
File metadata and controls
77 lines (62 loc) · 2.17 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: CI - Test
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
env:
PYTHONUNBUFFERED: "1"
FORCE_COLOR: "1"
jobs:
test:
name: Python ${{ matrix.python-version }} on ${{ startsWith(matrix.os, 'macos-') && 'macOS' || startsWith(matrix.os, 'windows-') && 'Windows' || 'Linux' }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.11", "3.12", "3.13", "3.14"]
runs-on: ${{ matrix.os }}
# Hard cap per matrix job — bail out fast on real hangs instead of
# burning CI minutes up to the GitHub-default 6h ceiling.
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Enable long paths on Windows
if: runner.os == 'Windows'
run: git config --system core.longpaths true
- name: Install poetry
run: pipx install poetry==2.4.1
- name: Set up Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
cache: "poetry"
python-version: ${{ matrix.python-version }}
cache-dependency-path: "poetry.lock"
- name: Select matrix Python for Poetry
run: |
poetry env use "${{ steps.setup-python.outputs.python-path }}"
- name: Install invoke
run: pipx install invoke
- name: Install Dependencies
run: invoke install
- name: Verify Poetry Python version
run: |
poetry run python -c "
import sys
expected = tuple(map(int, '${{ matrix.python-version }}'.split('.')))
actual = sys.version_info[:len(expected)]
print('Python:', sys.version)
assert actual == expected, f'Expected Python {expected}, got {actual}'
"
- name: Validate Types
if: always()
run: invoke type-check
- name: Run Tests
if: always()
run: invoke test-report-xml