CI: [BIPS-24543] adding validation workflows #5
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
name: Python Lint | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
workflow_dispatch: | |
permissions: | |
contents: write | |
jobs: | |
python_lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4.2.1 | |
with: | |
fetch-depth: 0 | |
- name: Black Linter | |
if: always() | |
uses: psf/black@stable | |
with: | |
options: "--check --verbose --diff" | |
src: "./src" | |
version: "~= 24.8.0" | |
- name: Flake8 Linter | |
if: always() | |
run: | | |
python -m pip install flake8 | |
flake8 src/ | |
- name: ISort Linter | |
if: always() | |
uses: isort/isort-action@v1.1.1 | |
- name: Bandit Linter | |
if: always() | |
run: | | |
python -m pip install bandit | |
bandit -r src |