added github action to run mypy and black on pull requests #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: Python Code Quality Checks | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
lint-and-typecheck: | |
name: Lint and Type Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.12.0 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Run Black (code formatter check) | |
run: black --check . | |
- name: Run Mypy (type checker) | |
run: mypy . |