Skip to content

Commit

Permalink
Add python linting to the CI
Browse files Browse the repository at this point in the history
Introducing flake8 and bandit
  • Loading branch information
tibroc committed Apr 25, 2024
1 parent 318cee8 commit 51ad8bd
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/lint-python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
name: lint-python

on:
push:
branches-ignore:
- 'dependabot/**'
pull_request:

defaults:
run:
working-directory: ./pairing-server

jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
# https://endoflife.date/python
# https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md#python
python-version:
- '3.9'
- '3.10'
- '3.11'
- '3.12'

steps:
- uses: actions/checkout@v4

- name: set up python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- run: pip install -r requirements.txt

- run: pip install flake8 bandit

- run: flake8 *.py test

- run: bandit *.py

0 comments on commit 51ad8bd

Please sign in to comment.