-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (44 loc) · 1.29 KB
/
linters.yaml
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
# SPDX-FileCopyrightText: 2022 Fermi Research Alliance, LLC
# SPDX-License-Identifier: Apache-2.0
---
name: Linters
on:
push:
branches:
- "**" # matches every branch
pull_request:
branches:
- main
jobs:
run_linters:
name: Run flake8 and pylint against code tree
runs-on: ubuntu-latest
steps:
- name: checkout code tree
uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: "3.7"
architecture: "x64"
- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
python3 -m pip install flake8
python3 -m pip install pylint
if [ -f requirements.txt ]; then python3 -m pip install -r requirements.txt; fi
- name: Lint with flake8
run: |
flake8 src --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 src --count --max-complexity=10 --max-line-length=120 --statistics
- name: Lint with Pylint
env:
PYTHONPATH: ${{ github.workspace }}/src
run: |
pylint src
license-check:
name: Run REUSE to check license compliance
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: fsfe/reuse-action@v1