-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (63 loc) · 2.33 KB
/
Copy path_quality.yml
File metadata and controls
63 lines (63 loc) · 2.33 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
---
# ─────────────────────────────────────────────────────────────────────────────
# _quality.yml
#
# Encapsulates quality checking, style/lint, and type checking.
# Fails the pipeline if any of these checks fail.
#
# Callers: development.yml, main.yml
# ─────────────────────────────────────────────────────────────────────────────
name: "Quality Gate (Reusable)"
on:
workflow_call:
inputs:
python_versions:
description: "JSON array of Python versions"
required: true
type: string
permissions:
contents: read
security-events: write
jobs:
quality:
name: "Quality (Python ${{ matrix.python-version }})"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ${{ fromJson(inputs.python_versions) }}
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: "Set up Python ${{ matrix.python-version }}"
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: ${{ matrix.python-version }}
- name: "Install uv"
run: pip install uv
- name: "Set up toolchain"
uses: pypa/hatch@install
- name: "Run quality checks"
run: |
hatch run lint:pre-commit
types:
name: "Types (Python ${{ matrix.python-version }})"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ${{ fromJson(inputs.python_versions) }}
steps:
- name: Checkout repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: "Set up Python ${{ matrix.python-version }}"
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: ${{ matrix.python-version }}
- name: "Install uv"
run: pip install uv
- name: "Set up toolchain"
uses: pypa/hatch@install
- name: "Run type checks"
run: |-
hatch run types:check