-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (53 loc) · 1.65 KB
/
Copy pathpython.yaml
File metadata and controls
69 lines (53 loc) · 1.65 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
name: Python
on:
pull_request: null
push: null
workflow_dispatch: null
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true
permissions:
contents: read # needed to checkout repository contents
jobs:
quality:
name: Astral Quality Gate
runs-on: ubuntu-24.04
timeout-minutes: 30
env:
UV_LOCKED: "1"
steps:
- name: Checkout Repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Install uv and Python
uses: astral-sh/setup-uv@d31148d669074a8d0a63714ba94f3201e7020bc3 # v8.3.0
with:
enable-cache: true
version-file: .tool-versions
- name: Verify Locked Environment
env:
UV_MALWARE_CHECK: "1"
run: |
uv lock --check
uv sync
- name: Check Ruff Formatting
run: uv run ruff format --check .
- name: Run Ruff
run: uv run ruff check --output-format github .
- name: Check Cognitive Complexity
run: uv run complexipy --plain
- name: Run ty
run: uv run ty check --output-format github
- name: Check Python Dependencies
run: uv run deptry . --github-output
- name: Find Dead Python Code
run: uv run vulture
- name: Compile Python Sources
run: uv run python -m compileall -q ansible dotfiles packages spectrum
- name: Validate Shared Manifests
run: uv run dotfiles-scripts manifests check
- name: Test
run: uv run pytest
- name: Build Package
run: uv build --no-build-logs