-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (52 loc) · 1.6 KB
/
linter.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
63
---
name: Linter
on:
push:
merge_group:
schedule:
- cron: 0 13 * * 1
#pull_request:
workflow_dispatch:
repository_dispatch:
types: [trigger_checks]
jobs:
pre-commit:
runs-on: macos-14
env:
RUFF_OUTPUT_FORMAT: github
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
cache: pip
python-version-file: .python-version
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip wheel mypy
python3 -m pip install -r requirements.txt
- name: Run pre-commit
run: |
pre-commit run --all-files
lint:
runs-on: macos-14
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
cache: pip
python-version-file: .python-version
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip wheel pylint mypy ruff
python3 -m pip install -r requirements.txt
- name: Run Ruff
run: ruff check --output-format=github .
- name: Run Ruff Format
run: ruff format --diff .
- name: Run mypy
run: |
mypy --install-types --non-interactive