forked from vega/altair
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (31 loc) · 821 Bytes
/
lint.yml
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
name: lint
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
name: ruff-mypy
steps:
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
cache-dependency-glob: |
**/uv.lock
**/pyproject.toml
# Installing all dependencies and not just the linters as mypy needs them for type checking
- name: Install dependencies
run: uv sync --all-extras
- name: ruff check (lint)
run: |
uv run ruff check
- name: ruff format
run: |
uv run ruff format --check --diff
- name: mypy (type check)
run: |
uv run mypy altair tests