Combine Python CI/CD pipelines into a single workflow and remove faulty pipelines #1
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
name: Python Checks | |
on: [pull_request] | |
jobs: | |
black: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install black | |
run: | | |
python -m pip install black | |
- name: Run black | |
run: | | |
black --check . | |
isort: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install isort | |
run: | | |
python -m pip install isort | |
- name: Run isort | |
run: | | |
isort --check . | |
bandit: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install bandit | |
run: | | |
python -m pip install bandit[toml] | |
- name: Run bandit scan | |
run: | | |
bandit -c pyproject.toml -r . --severity-level medium | |
mypy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install mypy | |
run: | | |
python -m pip install mypy | |
- name: Run mypy | |
run: | | |
mypy . --explicit-package-bases | |
pylint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install pylint | |
run: | | |
python -m pip install pylint | |
- name: Run pylint | |
run: | | |
pylint . |