Add CI/CD and pre-commit configuration #1
This file contains hidden or 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: Linting | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| branches: [ main, master ] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.12' | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -e ".[dev]" | |
| - name: Check code formatting with black | |
| run: | | |
| black --check src tests | |
| - name: Check import sorting with isort | |
| run: | | |
| isort --check-only src tests | |
| - name: Type check with mypy | |
| run: | | |
| mypy src/patchtest2 | |
| continue-on-error: true # Don't fail build on type errors initially |