-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (33 loc) · 1.02 KB
/
Copy pathpython-lint.yml
File metadata and controls
40 lines (33 loc) · 1.02 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
# .github/workflows/python-lint.yml
name: Ruff Lint
# Controls when the workflow will run
on:
# Triggers the workflow on push events for the "main" branch
push:
branches: [ "main" ]
# Also triggers on pull requests targeting the "main" branch
pull_request:
branches: [ "main" ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
lint:
# The type of runner that the job will run on
runs-on: ubuntu-latest
steps:
# 1. Check out the repository code
- name: Check out repository code
uses: actions/checkout@v4
# 2. Set up a consistent version of Python
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
# 3. Install Ruff for linting
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff
# 4. Run Ruff against the codebase
- name: Run Ruff lint checks
run: |
ruff check .