forked from mimi-net/miminet
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.35 KB
/
Copy pathlinter.yml
File metadata and controls
45 lines (38 loc) · 1.35 KB
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
name: Linter
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: ['back', 'front']
python-version: ["3.11"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: ${{matrix.node}}/requirements.txt
- name: Install dependencies
run: |
python -m pip install -U pip
pip install --upgrade pip setuptools
pip install flake8 mypy black~=24.0 isort wheel types-requests
if [ ${{matrix.node}} == 'back' ]; then
sudo apt-get update
sudo apt-get install -y --no-install-recommends mininet
mkdir -p /opt/mininet_dependencies
fi
pip install -r ${{matrix.node}}/requirements.txt
- name: Lint with mypy
run: |
mypy --ignore-missing-imports ${{matrix.node}}
- name: Lint with black
run: |
black --check --verbose --diff ${{matrix.node}}
- name: Lint with flake8
run: |
flake8 --count --verbose --max-line-length=88 --extend-ignore=E501,W391,C901,E203 --statistics ${{matrix.node}}