-
Notifications
You must be signed in to change notification settings - Fork 1.2k
38 lines (36 loc) · 1.1 KB
/
linter.yml
File metadata and controls
38 lines (36 loc) · 1.1 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
name: linter
on: [push, pull_request]
jobs:
lint-python:
runs-on: [ubuntu-latest]
env:
PYTHON: 3.11
steps:
- uses: actions/checkout@v4
- name: Setup Python
id: setup-python
uses: actions/setup-python@v5
with:
python-version: "3.11"
architecture: x64
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Install dependencies
run: |
make install-python-dependencies-ci
- name: Run pre-commit checks
uses: pre-commit/action@v3.0.1
- name: Cache MyPy
uses: actions/cache@v4
with:
path: sdk/python/.mypy_cache
key: mypy-${{ runner.os }}-py${{ env.PYTHON }}-${{ hashFiles('pyproject.toml', 'sdk/python/pyproject.toml', 'sdk/python/requirements/*.txt') }}
restore-keys: |
mypy-${{ runner.os }}-py${{ env.PYTHON }}-
mypy-${{ runner.os }}-
- name: Lint python
run: make lint-python
- name: Minimize uv cache
run: uv cache prune --ci