Repository navigation
64 lines (51 loc) · 1.92 KB
/
Copy pathtest.yml
File metadata and controls
64 lines (51 loc) · 1.92 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
name: "Test"
on: [push, pull_request, workflow_dispatch]
jobs:
test:
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
matrix:
# Oldest non-EOL and newest released
# scipy-stubs does not support Python 3.9
python-version: ["3.10", "3.13"]
# Tier 1 OSes
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
fail-fast: false
steps:
- name: Check out code
uses: actions/checkout@0717577d45739eb3c851188b29f50ed6c0b2194e # v2.8.0
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@e9aba2c848f5ebd159c070c61ea2c4e2b122355e # v2.3.4
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/pyproject.toml') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: python -m pip install --group tests
- name: Run pyright tests
uses: jakebailey/pyright-action@6cabc0f01c4994be48fd45cd9dbacdd6e1ee6e5e # v2.3.3
with:
pylance-version: latest-prerelease
python-version: ${{ matrix.python-version }}
- name: Run mypy tests
run: python -m mypy . --python-version=${{ matrix.python-version }}
- name: Run runtime regression tests
run: python -m pytest -q tests
- name: Run stubtest
run: python tests/run_stubtest.py
hygiene:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Check out code
uses: actions/checkout@0717577d45739eb3c851188b29f50ed6c0b2194e # v2.8.0
- name: Run Ruff Linter
uses: astral-sh/ruff-action@4919ec5cf1f49eff0871dbcea0da843445b837e6 # v3.6.1
- name: Run Ruff Formatter
run: ruff format --check