diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index cd9daf70..a8f3ce24 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -15,6 +15,8 @@ permissions: jobs: build: runs-on: ubuntu-latest + env: + UV_LOCKED: 1 strategy: fail-fast: false matrix: @@ -34,7 +36,7 @@ jobs: enable-cache: true cache-suffix: "python${{ matrix.python-version }}" - name: Install the project - run: uv sync --all-extras --dev + run: uv sync --locked --all-extras --dev #---------------------------------------------- # run ruff #---------------------------------------------- diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1c4a7174..251a63bd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,6 +7,8 @@ jobs: release-build: name: Build release artifacts runs-on: ubuntu-latest + env: + UV_LOCKED: 1 permissions: id-token: write @@ -27,7 +29,7 @@ jobs: enable-cache: true - name: Install the project - run: uv sync --all-extras --dev + run: uv sync --locked --all-extras --dev - name: Test run: | diff --git a/docs/contributing.md b/docs/contributing.md index b8844b89..9274e1c2 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -87,7 +87,10 @@ Ready to contribute? Here's how to set up `python-statemachine` for local develo 1. Install dependencies. 1. [graphviz](https://graphviz.org/download/#linux) - 1. [uv](https://docs.astral.sh/uv/getting-started/installation/) + 1. [uv](https://docs.astral.sh/uv/getting-started/installation/) 0.9.17 or newer + (older releases ignore the `[tool.uv]` settings in `pyproject.toml` and rewrite `uv.lock`). + The project resolves with a 7-day `exclude-newer` cooldown; to take a release younger + than that, use uv's `exclude-newer-package` setting. 1. Fork the `python-statemachine` repository on GitHub. diff --git a/pyproject.toml b/pyproject.toml index ef7011b2..ae2a7d32 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -69,6 +69,9 @@ dev = [ requires = ["hatchling"] build-backend = "hatchling.build" +[tool.uv] +exclude-newer = "7 days" + [tool.hatch.build.targets.wheel] packages = ["statemachine/"]