Switch code formatter from Black to Ruff #1946
Workflow file for this run
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: Pull request | |
| on: | |
| pull_request: | |
| branches: [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.14" | |
| allow-prereleases: true | |
| - name: Install ruff | |
| run: pip install "ruff>=0.9.0" | |
| - name: Check formatting | |
| run: ruff format --check . | |
| check-changelog: | |
| name: Check changelog fragment | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check for changelog fragment | |
| run: | | |
| FRAGMENTS=$(find changelog.d -type f ! -name '.gitkeep' | wc -l) | |
| if [ "$FRAGMENTS" -eq 0 ]; then | |
| echo "::error::No changelog fragment found in changelog.d/" | |
| echo "Add one with: echo 'Description.' > changelog.d/\$(git branch --show-current).<type>.md" | |
| echo "Types: added, changed, fixed, removed, breaking" | |
| exit 1 | |
| fi | |
| Test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| python-version: ["3.14"] | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| allow-prereleases: true | |
| - name: Install build dependencies | |
| run: pip install wheel setuptools | |
| - name: Install package | |
| run: make install | |
| - name: Run tests | |
| run: make test | |
| - uses: codecov/codecov-action@v4 | |
| - name: Build package | |
| run: make build | |
| - name: Test documentation builds | |
| run: make documentation |