-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (33 loc) · 925 Bytes
/
pre-commit.yml
File metadata and controls
41 lines (33 loc) · 925 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
40
41
name: Pre-commit Checks
on:
push:
branches: ["**"]
pull_request:
branches: ["**"]
jobs:
lint:
name: Lint (ruff / isort)
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
with:
persist-credentials: false
- name: Setup Python
uses: actions/setup-python@7f4fc3e22c37d6ff65e88745f38bd3157c663f7c
with:
python-version: "3.11"
- name: Install linters
run: |
python -m pip install --upgrade pip
pip install ruff isort removestar
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y tree cloc curl || true
- name: Make lint script executable
run: chmod +x ./lint.sh || true
- name: Run lint script
run: ./lint.sh