-
Notifications
You must be signed in to change notification settings - Fork 261
28 lines (28 loc) · 860 Bytes
/
ruff.yml
File metadata and controls
28 lines (28 loc) · 860 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
name: Ruff
on:
# Triggered whenever a commit is added to the main branch
push:
branches:
- main
# Triggered whenever a PR is opened or updated
pull_request:
jobs:
ruff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
# Use the minimum Python version in pyproject.toml (later versions should maintain backwards-compatibility)
python-version: "3.10"
cache: "pip"
- name: Install
run: pip install pre-commit
- name: Run pre-commit checks on all files
# run specific ruff pre-commit hooks on all files
run: >
pip install pre-commit
&& pre-commit install -f
&& pre-commit run ruff --all-files
&& pre-commit run ruff-format --all-files