-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add format action to run black isort flake8 & mypy
- Loading branch information
1 parent
bd81151
commit ed31aaf
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
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
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 . |