From bad86c325468a37b1c96a5a3b9fe857d93588241 Mon Sep 17 00:00:00 2001 From: Artur Shiriev Date: Tue, 9 Jun 2026 14:44:40 +0300 Subject: [PATCH] ci: split ci.yml into reusable _checks.yml workflow Mirror modern-di's structural split: ci.yml is now a thin trigger wrapper (push to main, pull_request, concurrency group) that calls _checks.yml via workflow_call. _checks.yml holds the actual lint and pytest jobs. Both files are byte-identical to their modern-di counterparts (no divergence in steps, action versions, matrix, or caching). Sets the shape up to add more callers later (e.g., a nightly schedule) without duplicating job definitions. Co-Authored-By: Claude Opus 4.7 (1M context) --- .github/workflows/_checks.yml | 38 +++++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 36 ++------------------------------- 2 files changed, 40 insertions(+), 34 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..88908af --- /dev/null +++ b/.github/workflows/_checks.yml @@ -0,0 +1,38 @@ +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.10 + - run: just install lint-ci + + pytest: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: + - "3.10" + - "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=. --cov-report xml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 669adee..85af5ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,4 @@ name: main - on: push: branches: @@ -11,36 +10,5 @@ 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.10 - - run: just install lint-ci - - pytest: - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - python-version: - - "3.10" - - "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=. --cov-report xml + checks: + uses: ./.github/workflows/_checks.yml