-
Notifications
You must be signed in to change notification settings - Fork 46
47 lines (38 loc) · 1.19 KB
/
linting_only.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
name: Lint files - no fixing
# This will check linting in local PRs
on: ["push", "pull_request"]
jobs:
build:
name: Lint-only
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7]
steps:
# Check out Scout code
- name: Check out git repository
uses: actions/checkout@v4
# Set up python
- name: Set up Python ${{ matrix.python-version}}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version}}
- name: Install Python Dependencies
run: |
pip install black flake8 isort
- name: Run linters
uses: wearerequired/lint-action@v2
# Let linters fix problems if they can
with:
github_token: ${{ secrets.github_token }}
auto_fix: false
# Enable linters
black: true
black_args: "--check -l 100"
# stop the build if there are Python syntax errors or undefined names
flake8: true
flake8_args: "scout/ --count --select=E9,F63,F7,F82 --show-source --statistics"
- name: Run isort
uses: jamescurtin/isort-action@master
with:
configuration: "--check-only --diff -m 3 --tc --fgw 0 --up -n -l 100"