-
Notifications
You must be signed in to change notification settings - Fork 3
58 lines (54 loc) · 1.51 KB
/
test.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Python test
on: [push, pull_request]
jobs:
test:
name: test-py${{ matrix.python-version}}-on-${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, windows-2022, macos-14]
python-version:
[
"3.8",
"3.9",
"3.10",
"3.11",
"3.12",
"3.13.0-rc.1",
"pypy3.10",
"pypy3.9",
]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- run: pip install pytest
- run: pytest . --junitxml=junit/test_py${{ matrix.python-version }}_on_${{ matrix.os }}.xml
- run: python -O once_test.py
- run: python -OO once_test.py
- name: Upload pytest test results
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test-py${{ matrix.python-version}}-on-${{ matrix.os }}
path: junit/test_py${{ matrix.python-version }}_on_${{ matrix.os }}.xml
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: psf/black@stable
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.11
cache: pip
- run: |
pip install mypy
mypy .