Enforce formatting #4
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 | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- "*" | |
jobs: | |
typecheck: | |
runs-on: ubuntu-latest | |
name: Typecheck | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.8" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pipenv | |
pipenv install --dev | |
- name: Install mypy | |
run: | | |
pipenv install mypy | |
- name: Run mypy | |
run: | | |
pipenv run mypy | |
lint: | |
runs-on: ubuntu-latest | |
name: Lint | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.8" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pipenv | |
pipenv install --dev | |
- name: Install ruff | |
run: | | |
pipenv install ruff | |
- name: Run ruff | |
run: | | |
pipenv run ruff check . --select E,F,I | |
format: | |
runs-on: ubuntu-latest | |
name: Format | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.8" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pipenv | |
pipenv install --dev | |
- name: Install ruff | |
run: | | |
pipenv install ruff | |
- name: Run ruff | |
run: | | |
pipenv run ruff format . --check |