ci: modernize code-quality workflow to use uv consistently #117
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 | |
| on: [push, pull_request] | |
| jobs: | |
| ci: | |
| name: Run black, mypy and pylint tools | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out Git repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install the latest version of uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| version: "latest" | |
| enable-cache: true | |
| - name: Install Python dependencies | |
| run: uv sync | |
| - name: Check code formatting with Black | |
| run: uv run black --check --diff . | |
| - name: Python type hinting and annotations checks with Mypy | |
| run: | | |
| uv run mypy *.py | |
| - name: Python code analysis with Pylint | |
| run: | | |
| uv run pylint --output-format=text ./**/*.py |