-
Notifications
You must be signed in to change notification settings - Fork 9
48 lines (37 loc) · 1.53 KB
/
test.yml
File metadata and controls
48 lines (37 loc) · 1.53 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
name: Test
on:
workflow_call:
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ["3.11", "3.12", "3.13"]
os: [ubuntu-latest, windows-latest]
permissions:
contents: read
steps:
# NOTE: Conditions are duplicated on each step instead of using job-level conditionals
# because GitHub expects ALL matrix combinations to report back when using matrix strategies.
# If we use job-level conditionals, matrix jobs won't run at all, leaving them in "pending"
# state and blocking PR merging. Step-level conditionals allow all matrix jobs to start
# and complete successfully, even when steps are skipped.
- name: Checkout
if: "!contains(github.event.pull_request.labels.*.name, 'test-core-dev-version')"
uses: actions/checkout@v4
- name: Setup uv
if: "!contains(github.event.pull_request.labels.*.name, 'test-core-dev-version')"
uses: astral-sh/setup-uv@v5
- name: Setup Python
if: "!contains(github.event.pull_request.labels.*.name, 'test-core-dev-version')"
uses: actions/setup-python@v5
with:
python-version-file: ".python-version"
- name: Install dependencies
if: "!contains(github.event.pull_request.labels.*.name, 'test-core-dev-version')"
run: uv sync --all-extras
- name: Run tests
if: "!contains(github.event.pull_request.labels.*.name, 'test-core-dev-version')"
run: uv run pytest
continue-on-error: true