Skip to content

CICD-061 · Lint changed Python sources ​

Encyclopedia · Python CI and uv · All snippets

Previous · CICD-060 · Next · CICD-062

1. Where it fits ​

  • Placement Bash run step following checkout, or equivalent lab terminal.
  • Prerequisites uv or Python dependencies pinned with fixture application and tests.
  • Platforms local-linux, github-actions, gitea-actions.

2. Copy the snippet ​

bash
uv run --locked ruff check src tests

3. How it works ​

Ruff reads Python source and project lint settings, then returns a nonzero code for configured violations. Use paths that include the shipping source and tests.

4. Verify the result ​

All findings fail the job. Keep rule configuration with the project.

Validation syntax-validated (Bash parse). Status definitions.