-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (73 loc) · 2.21 KB
/
test.yml
File metadata and controls
85 lines (73 loc) · 2.21 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
# CI for the ARCP Python SDK.
#
# Action pinning policy:
# - First-party `actions/*` actions are pinned to a major tag (e.g. `@v4`).
# GitHub controls these repos and major tags only move forward to
# non-breaking releases.
# - Third-party actions are pinned to a full commit SHA with the human-
# readable version in a trailing comment.
name: test
on:
push:
branches: [main]
paths-ignore:
- "**.md"
- "docs/**"
- "LICENSE"
- ".gitignore"
- ".editorconfig"
pull_request:
branches: [main]
paths-ignore:
- "**.md"
- "docs/**"
- "LICENSE"
- ".gitignore"
- ".editorconfig"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
jobs:
test:
name: test (py${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# `requires-python = ">=3.13"` in pyproject.toml.
# Floor + latest stable. 3.13 is currently both, 3.14 is the next stable.
python-version: ["3.13", "3.14"]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Install uv
uses: astral-sh/setup-uv@bd01e18f51369d5a26f1651c3cb451d3417e3bba # v6.10.0
with:
enable-cache: true
cache-dependency-glob: "uv.lock"
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install project
run: uv sync --frozen --all-extras --dev
- name: Ruff lint
run: uv run ruff check .
- name: Ruff format check
run: uv run ruff format --check .
- name: Pyright
run: uv run pyright
- name: Pytest
run: uv run pytest --junitxml=junit-${{ matrix.python-version }}.xml
- name: Upload junit XML on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: junit-${{ matrix.python-version }}
path: junit-${{ matrix.python-version }}.xml
if-no-files-found: ignore