Skip to content

Commit

Permalink
Add format action to run black isort flake8 & mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
IbraheemTuffaha committed Jul 10, 2024
1 parent bd81151 commit ed31aaf
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: format

on: push

jobs:
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.11"
- name: Install deps
uses: knowsuchagency/poetry-install@v1
- name: Run black check
run: poetry run black --check --diff .
isort:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.11"
- name: Install deps
uses: knowsuchagency/poetry-install@v1
- name: Run isort check
run: poetry run isort --check-only --diff .
flake8:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.11"
- name: Install deps
uses: knowsuchagency/poetry-install@v1
- name: Run flake8 check
run: poetry run flake8 --count .
mypy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.11"
- name: Install deps
uses: knowsuchagency/poetry-install@v1
- name: Run mypy check
run: poetry run mypy .

0 comments on commit ed31aaf

Please sign in to comment.