Sechub code updates #701
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will install Python dependencies, run tests and lint with a single version of Python | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Python linting | |
on: | |
push: | |
paths: | |
- '**.py' | |
pull_request: | |
paths: | |
- '**.py' | |
jobs: | |
flake8: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3 | |
uses: actions/setup-python@v4 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install flake8 | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Lint with flake8 | |
run: | | |
flake8 . --count --max-line-length=127 --statistics --exit-zero | |
pylint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3 | |
uses: actions/setup-python@v4 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pylint | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Lint with pylint | |
run: | | |
pylint * --exit-zero | |
bandit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3 | |
uses: actions/setup-python@v4 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install bandit | |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | |
- name: Lint with bandit | |
run: | | |
bandit -l -i -r . --exit-zero |