-
Notifications
You must be signed in to change notification settings - Fork 12
138 lines (115 loc) · 3.49 KB
/
Copy pathpython-test.yml
File metadata and controls
138 lines (115 loc) · 3.49 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
name: Python Test
on:
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: tests-${{ github.ref }}
cancel-in-progress: true
env:
RUST_BACKTRACE: 1
HANG_TIMEOUT_SEC: 200
jobs:
test-python:
name: ${{ matrix.python-version }}
runs-on: ubuntu-latest
continue-on-error: ${{ endsWith(matrix.python-version, 't') }}
strategy:
fail-fast: false
matrix:
python-version:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
- "3.14t"
- "3.15"
- "3.15t"
- "pypy3.11"
steps:
- uses: actions/checkout@v6.0.2
- uses: dtolnay/rust-toolchain@nightly
- uses: actions/setup-python@v6.2.0
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- run: pip install virtualenv
- run: pip install -r requirements-dev.txt
- run: virtualenv --no-vcs-ignore .venv
- run: pip install py-spy
shell: bash
- run: maturin develop --features use-small-offset
- name: pytest (default features)
shell: bash
run: |
chmod +x ./ci_hang_debug.sh
TIMEOUT_SEC=${{ env.HANG_TIMEOUT_SEC }} ./ci_hang_debug.sh -v -n auto
env:
HYPOTHESIS_PROFILE: slow
- name: Upload hang debug artifacts (default features)
if: failure()
uses: actions/upload-artifact@v4
with:
name: hang-debug-${{ matrix.python-version }}-default
path: hang_artifacts/
retention-days: 7
if-no-files-found: ignore
# Test with nightly feature
- run: maturin develop --features use-small-offset,nightly
- name: pytest (nightly feature)
shell: bash
run: |
chmod +x ./ci_hang_debug.sh
TIMEOUT_SEC=${{ env.HANG_TIMEOUT_SEC }} ./ci_hang_debug.sh -v -n auto
env:
HYPOTHESIS_PROFILE: slow
- name: Upload hang debug artifacts (nightly feature)
if: failure()
uses: actions/upload-artifact@v4
with:
name: hang-debug-${{ matrix.python-version }}-nightly
path: hang_artifacts/
retention-days: 7
if-no-files-found: ignore
test-os-nightly:
name: ${{ matrix.os }} (rust nightly)
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
steps:
- uses: actions/checkout@v6.0.2
- uses: dtolnay/rust-toolchain@nightly
- uses: actions/setup-python@v6.2.0
with:
python-version: "3.13"
- run: pip install virtualenv
- run: pip install -r requirements-dev.txt
- run: virtualenv --no-vcs-ignore .venv
- run: maturin develop --features use-small-offset,nightly
- run: pytest -v -n auto
env:
HYPOTHESIS_PROFILE: slow
test-os-stable:
name: ${{ matrix.os }} (rust stable)
runs-on: ${{ matrix.os }}-latest
strategy:
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
steps:
- uses: actions/checkout@v6.0.2
- uses: dtolnay/rust-toolchain@stable
- uses: actions/setup-python@v6.2.0
with:
python-version: "3.13"
- run: pip install virtualenv
- run: pip install -r requirements-dev.txt
- run: virtualenv --no-vcs-ignore .venv
- run: maturin develop --features use-small-offset
- run: pytest -v -n auto
env:
HYPOTHESIS_PROFILE: slow