-
Notifications
You must be signed in to change notification settings - Fork 6
42 lines (34 loc) · 1.05 KB
/
checks.yaml
File metadata and controls
42 lines (34 loc) · 1.05 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
name: Code Quality Checks
# This workflow runs static analysis that doesn't require secrets
on:
pull_request:
types: [opened, synchronize, reopened]
push:
branches:
- main
env:
PYTHON_VERSION: "3.11"
jobs:
checks:
name: Code Quality Checks
runs-on: ${{ contains(github.server_url, 'github.com') && 'ubuntu-latest' || fromJSON('["self-hosted"]') }}
permissions:
contents: read
steps:
- name: "Checkout PR Code"
uses: actions/checkout@v4
- name: "Install uv"
uses: astral-sh/setup-uv@v3
with:
version: "latest"
enable-cache: true
- name: "Set up Python"
uses: actions/setup-python@v6
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: "Run Ruff Linter"
run: uv run ruff check --output-format=github .
- name: "Run Ruff Formatter Check"
run: uv run ruff format --check --diff .
- name: "Run ty Type Check"
run: uv run ty check --output-format github --python-version ${{ env.PYTHON_VERSION }} .