Repository navigation
50 lines (40 loc) · 1.58 KB
/
Copy pathlint.yml
File metadata and controls
50 lines (40 loc) · 1.58 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
name: Lint
on:
pull_request:
branches: [main, "release/*"]
push:
branches: [main, "release/*"]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint:
runs-on: windows-latest
# Bumped from 5: combined mypy on 24 packages cold-starts at ~3-4 min on
# Windows runners; the original 5-min ceiling cancelled mid-run.
timeout-minutes: 10
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Install uv
uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
- name: Set up Python
run: uv python install 3.11
- name: Install dependencies
run: uv sync --all-extras --all-groups
- name: Check license headers
run: |
uv run pre-commit run insert-license --all-files
- name: Lint
run: uv run ruff check src/ tests/
# Required type check: the ENTIRE winml.modelkit package is clean against
# the strict config in pyproject.toml. Any new mypy error here blocks the PR.
#
# A single whole-package invocation (not a per-subpackage list) — it covers
# every subpackage plus the top-level modules (cli.py, __init__.py, etc.),
# and surfaces cross-package interactions (import cycles, shared return-type
# unions) that per-subpackage runs miss. Relaxed/ignored modules (tests,
# analyze.onnx_opset) are scoped via [[tool.mypy.overrides]] in pyproject.
- name: Type check (required)
run: >-
uv run mypy
-p winml.modelkit