CI: Enforce code style #22
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
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| name: CI | |
| jobs: | |
| test: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| deps: | |
| - { python: '3.8' } | |
| - { python: '3.9' } | |
| - { python: '3.10' } | |
| - { python: '3.11' } | |
| - { python: '3.12' } | |
| fail-fast: false | |
| name: Python ${{ matrix.deps.python }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Setup python ${{ matrix.deps.python }} | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.deps.python }} | |
| - name: Upgrade pip | |
| run: pip install -U pip | |
| - name: Install dev dependencies | |
| run: pip install -r requirements-dev.txt | |
| - name: Run tests | |
| run: pytest | |
| format: | |
| runs-on: ubuntu-24.04 | |
| name: Check code formatting with black | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Setup python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: 3.12 | |
| - name: Install black | |
| run: pip install black~=25.1 | |
| - name: Check code formatting | |
| run: black --check . |