-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (34 loc) · 885 Bytes
/
python-lint.yaml
File metadata and controls
39 lines (34 loc) · 885 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
38
39
name: Python Ruff Linter
on:
push:
branches: [ main ]
paths:
- '**.py'
pull_request:
branches: [ main ]
paths:
- '**.py'
workflow_dispatch:
permissions:
contents: read
jobs:
ruff-check-linting:
name: Python ${{ matrix.python_version }} - Ruff Linter
if: ${{ always() }} # Always run even if a matrix candidate fails
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python_version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python_version }}
architecture: x64
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install ruff
- name: Check linting with ruff
run: python3 -m ruff check .