From 09a1d1c5f7f1fa03c3e5359e0f48acf378daab5c Mon Sep 17 00:00:00 2001 From: Artur Shiriev Date: Tue, 9 Jun 2026 16:52:48 +0300 Subject: [PATCH] ci: align with modern-di MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Bump pins: checkout@v4 → @v6, setup-just@v2 → @v4, setup-uv@v3 → @v8.2.0. - Split ci.yml into thin trigger wrapper + reusable _checks.yml. The pytest job preserves its existing raw `uv sync` + `uv run pytest` pattern (does not use `just`) and its redpanda services block. No codecov in this repo. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/_checks.yml | 48 +++++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 46 ++------------------------------- .github/workflows/publish.yml | 6 ++--- 3 files changed, 53 insertions(+), 47 deletions(-) create mode 100644 .github/workflows/_checks.yml diff --git a/.github/workflows/_checks.yml b/.github/workflows/_checks.yml new file mode 100644 index 0000000..2239d4a --- /dev/null +++ b/.github/workflows/_checks.yml @@ -0,0 +1,48 @@ +name: checks +on: + workflow_call: {} + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + - uses: extractions/setup-just@v4 + - uses: astral-sh/setup-uv@v8.2.0 + with: + enable-cache: true + cache-dependency-glob: "**/pyproject.toml" + - run: uv python install 3.13 + - run: just install lint-ci + + pytest: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: + - "3.11" + - "3.12" + - "3.13" + - "3.14" + services: + redpanda: + image: redpandadata/redpanda:latest + ports: + - 9092:9092 + options: >- + --health-cmd "rpk cluster health" + --health-interval 10s + --health-timeout 5s + --health-retries 5 + steps: + - uses: actions/checkout@v6 + - uses: astral-sh/setup-uv@v8.2.0 + with: + enable-cache: true + cache-dependency-glob: "**/pyproject.toml" + - run: uv python install ${{ matrix.python-version }} + - run: uv sync + - run: uv run --no-sync pytest . --cov=. --cov-report xml + env: + KAFKA_BOOTSTRAP_SERVERS: localhost:9092 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ef64f38..85af5ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,4 @@ name: main - on: push: branches: @@ -11,46 +10,5 @@ concurrency: cancel-in-progress: true jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: extractions/setup-just@v2 - - uses: astral-sh/setup-uv@v3 - with: - enable-cache: true - cache-dependency-glob: "**/pyproject.toml" - - run: uv python install 3.13 - - run: just install lint-ci - - pytest: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - python-version: - - "3.11" - - "3.12" - - "3.13" - - "3.14" - services: - redpanda: - image: redpandadata/redpanda:latest - ports: - - 9092:9092 - options: >- - --health-cmd "rpk cluster health" - --health-interval 10s - --health-timeout 5s - --health-retries 5 - steps: - - uses: actions/checkout@v4 - - uses: astral-sh/setup-uv@v3 - with: - enable-cache: true - cache-dependency-glob: "**/pyproject.toml" - - run: uv python install ${{ matrix.python-version }} - - run: uv sync - - run: uv run --no-sync pytest . --cov=. --cov-report xml - env: - KAFKA_BOOTSTRAP_SERVERS: localhost:9092 + checks: + uses: ./.github/workflows/_checks.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b637272..916fc36 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -9,9 +9,9 @@ jobs: publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - uses: extractions/setup-just@v2 - - uses: astral-sh/setup-uv@v3 + - uses: actions/checkout@v6 + - uses: extractions/setup-just@v4 + - uses: astral-sh/setup-uv@v8.2.0 - run: just publish env: PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}