Chore/add python formatter and linter (#37) #2
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: Check Python code format with Black | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'src/**/*.py' | |
| pull_request: | |
| paths: | |
| - 'src/**/*.py' | |
| jobs: | |
| black-format: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install Black | |
| run: pip install black | |
| - name: Check code format with Black | |
| run: black --check src/ |