-
Notifications
You must be signed in to change notification settings - Fork 122
37 lines (28 loc) · 856 Bytes
/
code-check.yml
File metadata and controls
37 lines (28 loc) · 856 Bytes
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
name: Code Check
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
code-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
version: "0.8.4"
enable-cache: true
- name: Install dependencies
run: uv sync --locked --group lint
- name: Check imports with ruff
run: uv run ruff check --select I --exit-non-zero-on-fix .
- name: Check formatting with ruff
run: uv run ruff format --check .
- name: Clean notebooks
run: uv run nb-clean check --remove-empty-cells --remove-all-notebook-metadata --preserve-cell-outputs examples/*.ipynb