Skip to content

CICD-052 · Use uv with a committed lockfile ​

Encyclopedia · Gitea runner fundamentals · All snippets

Previous · CICD-051 · Next · CICD-053

1. Where it fits ​

  • Placement Bash run step following checkout, or equivalent lab terminal.
  • Prerequisites Gitea Actions enabled, authorized trusted runner registered and local repository checked out when needed.
  • Platforms gitea-actions.

2. Copy the snippet ​

bash
uv sync --locked
uv run --locked pytest -q

3. How it works ​

uv sync --locked verifies the lock against project declarations and provisions dependencies. uv run --locked keeps the test command on that resolution.

4. Verify the result ​

Dependency drift must fail instead of silently updating uv.lock.

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