-
Notifications
You must be signed in to change notification settings - Fork 22
98 lines (79 loc) · 2.41 KB
/
Copy pathcode-checks.yml
File metadata and controls
98 lines (79 loc) · 2.41 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
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Code Checks
on:
pull_request:
workflow_dispatch:
# Enables manual execution from the Actions tab
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
ruff-check:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.13"] # Python version to run
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Fandango
uses: ./.github/workflows/setup-fandango
with:
python-version: ${{ matrix.python-version }}
needs-sudo: true
skip-parser: 1
- name: Check formatting with ruff
run: |
uv run ruff format --check .
- name: Run ruff
run: |
uv run ruff check src tests evaluation scripts
uv-check:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.11", "3.12", "3.13", "3.14"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v7
with:
python-version: ${{ matrix.python-version }}
activate-environment: true
cache-dependency-glob: |
pyproject.toml
- name: Check if `uv.lock` is up-to-date
run: |
uv lock --check
- name: Check if `pylock.toml` is up-to-date
shell: bash
run: |
uv export --output-file=pylock.toml --all-extras --locked
if ! git diff --quiet -- pylock.toml; then
echo "Error: pylock.toml is out of sync with uv.lock. Please run 'uv export --output-file=pylock.toml --all-extras --locked'."
git diff -- pylock.toml
exit 1
fi
mypy-check:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.11", "3.12", "3.13", "3.14"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Fandango
uses: ./.github/workflows/setup-fandango
with:
python-version: ${{ matrix.python-version }}
needs-sudo: ${{ matrix.os == 'ubuntu-latest' }}
skip-parser: 1
- name: Run mypy
shell: bash
run: |
uv run mypy .
uv run mypy --strict src