Add Ruff linting CI and reformat #1
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: ci-restart | |
| on: | |
| # Triggers the workflow on pushes to the "main" branch, i.e., PR merges | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| workflow_dispatch: | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: { python-version: '3.10' } | |
| - run: python -m pip install --upgrade pip && python -m pip install ruff | |
| - run: ruff format --diff . | |
| - run: ruff check --diff . | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: { python-version: '3.10' } | |
| - run: | | |
| python -m pip install --upgrade pip | |
| python -m venv venv | |
| . venv/bin/activate | |
| pip install .[dev] | |
| # tests are currently empty | |
| pytest || [ $? -eq 5 ] |