-
Notifications
You must be signed in to change notification settings - Fork 2
43 lines (36 loc) · 1.12 KB
/
main.yml
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
name: Pytest-run-parallel tests
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.13t', 'pypy-3.8']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
if: ${{ !endsWith(matrix.python-version, 't') && matrix.python-version != '3.13' }}
with:
python-version: ${{ matrix.python-version }}
- name: Setup free-threaded variables
if: ${{ endsWith(matrix.python-version, 't') }}
run: |
echo "FREE_THREADED=1" >> "$GITHUB_ENV"
- uses: deadsnakes/action@6c8b9b82fe0b4344f4b98f2775fcc395df45e494 # v3.1.0
if: ${{ endsWith(matrix.python-version, 't') || matrix.python-version == '3.13' }}
with:
python-version: "3.13"
nogil: ${{ env.FREE_THREADED == '1' }}
- name: Install tox
run: pip install tox
- name: Test
env:
PYTHON_GIL: ${{ env.FREE_THREADED != '1' }}
run: tox -e py