github: Update Python linter workflow.

This commit is contained in:
iabdalkader 2023-07-05 18:53:12 +02:00
parent ec5b6b534d
commit 6197ca2cc8
2 changed files with 7 additions and 10 deletions

View File

@ -4,12 +4,6 @@
name: '🔎 Python Linter'
on:
push:
branches:
- 'master'
paths:
- 'scripts/libraries/*.py'
pull_request:
types:
- opened
@ -18,11 +12,11 @@ on:
branches:
- 'master'
paths:
- 'scripts/examples/*.py'
- 'scripts/libraries/*.py'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
@ -36,13 +30,14 @@ jobs:
- name: '🐍 Set up Python ${{ matrix.python-version }}'
uses: actions/setup-python@v4
with:
cache: 'pip'
python-version: ${{ matrix.python-version }}
- name: '🛠 Install dependencies'
run: |
python -m pip install --upgrade pip
python -m pip install flake8 pytest
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
pip install -r requirements.txt
flake8 --version
pytest --version
- name: '😾 Lint with flake8'
run: |

2
.github/workflows/requirements.txt vendored Normal file
View File

@ -0,0 +1,2 @@
flake8
pytest