-
Notifications
You must be signed in to change notification settings - Fork 7
54 lines (45 loc) · 1.51 KB
/
Copy pathtest.yml
File metadata and controls
54 lines (45 loc) · 1.51 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
name: Test
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
# Boundaries of the supported range (requires-python = ">=3.9"); the
# floor catches accidental newer-syntax usage, the ceiling catches
# deprecations. Intermediate minors rarely surface unique issues.
python-version: ['3.9', '3.12']
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pytest ruff pre-commit tomli
- name: Run lint
run: ruff check .
- name: Check plugin sync
run: python scripts/sync_plugin.py --check
- name: Run tests
run: pytest tests/ -v
# Stable aggregate check. The `main` ruleset requires a status named `ci`,
# so this job keeps that name regardless of the test matrix dimensions
# (OS / Python version), preventing required-check drift when the matrix
# changes.
ci:
needs: [test]
if: always()
runs-on: ubuntu-latest
steps:
- name: Verify the test matrix succeeded
if: needs.test.result != 'success'
run: exit 1