-
Notifications
You must be signed in to change notification settings - Fork 23
62 lines (54 loc) · 1.29 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Lint
on:
push:
branches:
- '**' # matches every branch
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}-lint"
cancel-in-progress: true
defaults:
run:
shell: bash
permissions:
id-token: write
attestations: write
jobs:
changes:
runs-on: ubuntu-latest
timeout-minutes: 1
defaults:
run:
shell: bash
outputs:
lint: ${{steps.changes.outputs.lint }}
steps:
- name: Checkout code
uses: actions/checkout@v4.1.7
- id: changes
name: Check for file changes
uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd # v3.0.0
with:
base: ${{ github.ref }}
token: ${{ github.token }}
filters: .github/file-filters.yml
lint:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
needs: [ changes ]
if: needs.changes.outputs.lint
steps:
- name: Checkout code
uses: actions/checkout@v4.1.7
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
architecture: 'x64'
- uses: yezz123/setup-uv@v4
- name: lint
if: needs.changes.outputs.lint
run: |
uv run isort src/ --check-only
uv run flake8 src/