β¬οΈ Update astral-sh/setup-uv action to v5.2.1 #44
Workflow file for this run
This file contains 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: Linting | |
# yamllint disable-line rule:truthy | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
env: | |
DEFAULT_PYTHON: "3.13" | |
jobs: | |
ruff: | |
name: Ruff | |
runs-on: ubuntu-latest | |
steps: | |
- name: β€΅οΈ Check out code from GitHub | |
uses: actions/checkout@v4.2.2 | |
- name: π Set up UV | |
uses: astral-sh/setup-uv@v5.2.1 | |
with: | |
version: "latest" | |
python-version: ${{ env.DEFAULT_PYTHON }} | |
enable-cache: true | |
- name: π Install project dependencies | |
run: uv sync --all-extras --dev | |
- name: π Run ruff linter | |
run: uv run ruff check --output-format=github . | |
- name: π Run ruff formatter | |
run: uv run ruff format --check . | |
pre-commit-hooks: | |
name: Pre-commit hooks | |
runs-on: ubuntu-latest | |
steps: | |
- name: β€΅οΈ Check out code from GitHub | |
uses: actions/checkout@v4.2.2 | |
- name: π Set up UV | |
uses: astral-sh/setup-uv@v5.2.1 | |
with: | |
version: "latest" | |
python-version: ${{ env.DEFAULT_PYTHON }} | |
enable-cache: true | |
- name: π Install project dependencies | |
run: uv sync --all-extras --dev | |
- name: π Check Python AST | |
run: uv run pre-commit run check-ast --all-files | |
- name: π Check for case conflicts | |
run: uv run pre-commit run check-case-conflict --all-files | |
- name: π Check docstring is first | |
run: uv run pre-commit run check-docstring-first --all-files | |
- name: π Detect Private Keys | |
run: uv run pre-commit run detect-private-key --all-files | |
- name: π Check End of Files | |
run: uv run pre-commit run end-of-file-fixer --all-files | |
- name: π Trim Trailing Whitespace | |
run: uv run pre-commit run trailing-whitespace --all-files |