diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0b01a14..5f3afa2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,16 +10,21 @@ jobs: runs-on: ubuntu-latest permissions: id-token: write + env: + UV_SYSTEM_PYTHON: 1 steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 with: persist-credentials: false - - uses: astral-sh/setup-uv@v7 + fetch-depth: 0 + - id: setup-uv + name: Setup UV + uses: astral-sh/setup-uv@v7 with: - enable-cache: false - python-version: "3.12" - version: "latest" - - run: uv version "${GITHUB_REF_NAME}" + enable-cache: true + cache-suffix: "3.13" + github-token: ${{ github.token }} + python-version: "3.13" - run: uv build - name: Release package env: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c437768..21d0997 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,16 +20,18 @@ jobs: cmd: ["black", "ruff", "mypy"] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 with: persist-credentials: false + fetch-depth: 0 - id: setup-uv + name: Setup UV uses: astral-sh/setup-uv@v7 with: enable-cache: true - cache-suffix: 3.11 - version: "latest" - python-version: 3.11 + cache-suffix: "3.11" + github-token: ${{ github.token }} + python-version: "3.11" - name: Install deps run: uv sync --all-extras - name: Run lint check @@ -50,8 +52,8 @@ jobs: KAFKA_PROCESS_ROLES: broker,controller KAFKA_LISTENERS: PLAINTEXT://0.0.0.0:9092,CONTROLLER://localhost:9093 KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092 - KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT + KAFKA_CONTROLLER_LISTENER_NAMES: CONTROLLER KAFKA_CONTROLLER_QUORUM_VOTERS: 1@localhost:9093 strategy: matrix: @@ -59,15 +61,17 @@ jobs: os: [ubuntu-latest] runs-on: "${{ matrix.os }}" steps: - - uses: actions/checkout@v5 + - uses: actions/checkout@v6 with: persist-credentials: false + fetch-depth: 0 - id: setup-uv + name: Setup UV uses: astral-sh/setup-uv@v7 with: enable-cache: true cache-suffix: ${{ matrix.py_version }} - version: "latest" + github-token: ${{ github.token }} python-version: ${{ matrix.py_version }} - name: Install deps run: uv sync --all-extras diff --git a/pyproject.toml b/pyproject.toml index a555a9a..eaae9cf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ authors = [ maintainers = [ {name = "Taskiq team", email = "taskiq@no-reply.com"} ] -version = "0.2.1" +dynamic = ["version"] readme = "README.md" license = "MIT" license-files = ["LICENSE"] @@ -52,12 +52,14 @@ dev = [ ] [build-system] -requires = ["uv_build>=0.9.9,<0.10.0"] -build-backend = "uv_build" +requires = ["hatchling", "versioningit"] +build-backend = "hatchling.build" -[tool.uv.build-backend] -module-name = "taskiq_aio_kafka" -module-root = "" +[tool.hatch.version] +source = "versioningit" + +[tool.hatch.build.targets.wheel] +packages = ["taskiq_aio_kafka"] [tool.pytest.ini_options] log_level = 'INFO'