From 32eccbeddf8d88cf4a65546f073d68d6c97565c5 Mon Sep 17 00:00:00 2001 From: Artur Shiriev Date: Tue, 9 Jun 2026 17:50:31 +0300 Subject: [PATCH] ci: split ci.yml into reusable _checks.yml workflow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Mirror modern-di's structural split: ci.yml becomes a thin trigger wrapper containing the `checks:` job (delegates to _checks.yml via workflow_call) plus the autosemver-specific `action-smoke` job (PR-only, dogfoods the local composite action with dry-run wiring). _checks.yml holds the lint and pytest jobs. action-smoke stays in ci.yml rather than _checks.yml because it exercises `uses: ./` against the local checkout — autosemver-specific, not a candidate for a reusable workflow. Action pins were already bumped to v6/v4/v8.2.0 in an earlier sweep, so this PR is structural only. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/_checks.yml | 37 +++++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 34 ++------------------------------ 2 files changed, 39 insertions(+), 32 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..2add0bc --- /dev/null +++ b/.github/workflows/_checks.yml @@ -0,0 +1,37 @@ +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.11 + - 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" + 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 ${{ matrix.python-version }} + - run: just install + - run: just test --cov-report xml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 49277ba..f4ebb9d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,38 +11,8 @@ concurrency: cancel-in-progress: true 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.11 - - 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" - 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 ${{ matrix.python-version }} - - run: just install - - run: just test --cov-report xml + checks: + uses: ./.github/workflows/_checks.yml action-smoke: # PR-only: action-smoke has no value on push-to-main, where the dogfood