Skip to content

Commit

Permalink
Automatically run bandit and flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
lkiesow committed Feb 2, 2024
1 parent bd1e5c8 commit 08ffcfe
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
36 changes: 36 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: bandit and flake8

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

jobs:
test:
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.8'
- '3.9'
- '3.10'
- '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 }}

- run: pip install -r requirements.txt

- run: pip install flake8 bandit

- run: flake8 *.py

- run: bandit *.py
2 changes: 1 addition & 1 deletion nginx-ldap-connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,5 +76,5 @@ def auth():


if __name__ == '__main__':
app.run(host=os.environ.get('LISTEN_ADDR', '0.0.0.0'),
app.run(host=os.environ.get('LISTEN_ADDR', '127.0.0.1'),
port=os.environ.get('LISTEN_PORT' '5000'))

0 comments on commit 08ffcfe

Please sign in to comment.