Skip to content

Add --frozen flag to "sync-and-running" documentation #10793

@f0lie

Description

@f0lie

https://docs.astral.sh/uv/guides/integration/github/#syncing-and-running

We have:

name: Example

jobs:
  uv-example:
    name: python
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - name: Install uv
        uses: astral-sh/setup-uv@v5

      - name: Install the project
        run: uv sync --all-extras --dev

      - name: Run tests
        # For example, using `pytest`
        run: uv run pytest tests

And it seems like it should be:

name: Example

jobs:
  uv-example:
    name: python
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - name: Install uv
        uses: astral-sh/setup-uv@v5

      - name: Install the project
        run: uv sync --all-extras --dev --frozen

      - name: Run tests
        # For example, using `pytest`
        run: uv run pytest tests

There should also be in the docs a blurb about how by default uv sync updates all the lockfile and using --frozen ensures that the same version of the packages on the dev machine is used by the github actions VM.

This behavior isn't very obvious for a newcomer reading the documentation and the integration section would be a great place to clarify that behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationneeds-decisionUndecided if this should be done

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions