-
Notifications
You must be signed in to change notification settings - Fork 11
47 lines (39 loc) · 1.09 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
on:
push:
branches:
- main
tags:
- '**'
pull_request:
jobs:
lint:
runs-on: ubuntu-22.04
strategy:
matrix:
# only use one version for the lint step
python-version: [3.9]
steps:
- id: checkout
uses: actions/checkout@v2
with:
# Do not persist the token during execution of this job.
persist-credentials: false
- id: dependencies
run: |
# Must be installed via the system
sudo apt install python3-bpfcc python3-pip
pip install -U pip toml
pip install '.[lint]'
- id: pylint
run: pylint --rcfile .pylintrc src/ || pylint-exit $? -efail
- id: mypy
run: python -m mypy --strict src/ --python-version 3.8
- id: validate-style
run: |
isort --recursive src/
black src/
if [ $(git diff --name-only --diff-filter=ACMR | wc -l ) != 0 ]; then
echo "Reformatting failed! Please run make fmt on your commits and resubmit!" 1>&2;
git diff;
exit 1;
fi