CI: migrate workflows from poetry to uv #43
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: Lint Python code with ruff | |
| # Caching source: https://gist.github.com/gh640/233a6daf68e9e937115371c0ecd39c61?permalink_comment_id=4529233#gistcomment-4529233 | |
| on: | |
| push: | |
| workflow_dispatch: | |
| pull_request_review: | |
| types: [submitted] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| if: | |
| github.event_name == 'push' || github.event.review.state == 'APPROVED' || github.event_name == 'workflow_dispatch' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| run: | | |
| pip install uv | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.13 | |
| cache: pip | |
| cache-dependency-path: uv.lock | |
| - name: Install dependencies with dev group | |
| run: | | |
| uv sync | |
| - name: Run ruff | |
| run: | | |
| uv run ruff --version | |
| uv run ruff check . --preview |