-
-
Notifications
You must be signed in to change notification settings - Fork 33
85 lines (74 loc) · 2.01 KB
/
Copy pathtest.yml
File metadata and controls
85 lines (74 loc) · 2.01 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
name: test
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
pytest-version: ["~=7.2", "~=8.3", "~=9.0"]
steps:
- uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -U pip setuptools wheel
pip install -e .
# Force correct `pytest` version for different envs:
pip install -U "pytest${{ matrix.pytest-version }}"
- name: Run tests
run: pytest
test-mypy-compat:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
mypy-version:
- "~=1.3.0" # Lowest supported mypy version
- "~=1.19.1"
- "~=2.0.0"
steps:
- uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v7
with:
# 3.11 is the highest Python supported by the lowest mypy in the matrix.
python-version: "3.11"
- name: Install dependencies
run: |
pip install -U pip setuptools wheel
pip install -e .
pip install -U "mypy${{ matrix.mypy-version }}"
- name: Run cache-cleanup tests
run: pytest pytest_mypy_plugins/tests/test_mypy_cache.py
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v7
with:
python-version: 3.12
- name: Install dependencies
run: |
pip install -U pip setuptools wheel
pip install -r requirements.txt
- name: Run linters
run: |
mypy .
black --check .
isort --check --diff .