Avoid errors when changing data by checking variables (#45) #50
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: Check the code style | |
on: | |
workflow_dispatch: | |
push: | |
branches: [main] | |
paths: ["**.py"] | |
pull_request: | |
branches: [main] | |
paths: ["**.py"] | |
jobs: | |
black: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.7" | |
- name: Install black | |
run: pip install black | |
- name: Run the black formatter | |
run: black --diff --check . | |
isort: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.7" | |
- name: Install isort | |
run: pip install isort | |
- name: Run the isort linter | |
run: isort --diff --check . | |
flake8: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: "3.7" | |
- name: Install flake8 | |
run: pip install pyproject-flake8 | |
- name: Run the flake8 linter | |
run: pflake8 . |