From 6cfb0fbfc6e34dbd3e48d287870770890ab00258 Mon Sep 17 00:00:00 2001 From: Manoel Aranda Neto Date: Thu, 11 Jun 2026 16:55:10 +0200 Subject: [PATCH 1/2] chore: split CI checks into separate jobs --- .github/workflows/ci.yml | 80 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 78 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 072c68a0..4df0fc31 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,9 +9,13 @@ on: permissions: contents: read +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: - code-quality: - name: Code quality checks + ruff-format: + name: Ruff format runs-on: ubuntu-latest steps: @@ -38,14 +42,86 @@ jobs: run: | ruff format --check . + ruff-lint: + name: Ruff lint + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 + with: + fetch-depth: 1 + + - name: Set up Python 3.11 + uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 + with: + python-version: 3.11.11 + + - name: Install uv + uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0 + with: + enable-cache: true + + - name: Install dev dependencies + shell: bash + run: | + UV_PROJECT_ENVIRONMENT=$pythonLocation uv sync --extra dev + - name: Lint with ruff run: | ruff check . + mypy: + name: Mypy + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 + with: + fetch-depth: 1 + + - name: Set up Python 3.11 + uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 + with: + python-version: 3.11.11 + + - name: Install uv + uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0 + with: + enable-cache: true + + - name: Install dev dependencies + shell: bash + run: | + UV_PROJECT_ENVIRONMENT=$pythonLocation uv sync --extra dev + - name: Check types with mypy run: | mypy --no-site-packages --config-file mypy.ini . | mypy-baseline filter + package-build: + name: Package build + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 + with: + fetch-depth: 1 + + - name: Set up Python 3.11 + uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 + with: + python-version: 3.11.11 + + - name: Install uv + uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0 + with: + enable-cache: true + + - name: Build and verify distributions + run: | + uv build + uv run --with twine twine check dist/* + tests: name: Python ${{ matrix.python-version }} tests runs-on: ubuntu-latest From c2027b611e797aa6dba1a817f1391c6686c8066c Mon Sep 17 00:00:00 2001 From: Manoel Aranda Neto Date: Thu, 11 Jun 2026 17:19:26 +0200 Subject: [PATCH 2/2] address pr review feedback --- .github/actions/setup-python-dev/action.yml | 26 +++++++++++ .github/workflows/ci.yml | 48 +++------------------ 2 files changed, 32 insertions(+), 42 deletions(-) create mode 100644 .github/actions/setup-python-dev/action.yml diff --git a/.github/actions/setup-python-dev/action.yml b/.github/actions/setup-python-dev/action.yml new file mode 100644 index 00000000..dca18590 --- /dev/null +++ b/.github/actions/setup-python-dev/action.yml @@ -0,0 +1,26 @@ +name: Setup Python dev environment +description: Set up Python, uv, and dev dependencies for CI checks. + +inputs: + python-version: + description: Python version to install. + required: false + default: 3.11.11 + +runs: + using: composite + steps: + - name: Set up Python ${{ inputs.python-version }} + uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 + with: + python-version: ${{ inputs.python-version }} + + - name: Install uv + uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0 + with: + enable-cache: true + + - name: Install dev dependencies + shell: bash + run: | + UV_PROJECT_ENVIRONMENT=$pythonLocation uv sync --extra dev diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4df0fc31..c0cf09bc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,20 +23,8 @@ jobs: with: fetch-depth: 1 - - name: Set up Python 3.11 - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 - with: - python-version: 3.11.11 - - - name: Install uv - uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0 - with: - enable-cache: true - - - name: Install dev dependencies - shell: bash - run: | - UV_PROJECT_ENVIRONMENT=$pythonLocation uv sync --extra dev + - name: Set up Python dev environment + uses: ./.github/actions/setup-python-dev - name: Check formatting with ruff run: | @@ -51,20 +39,8 @@ jobs: with: fetch-depth: 1 - - name: Set up Python 3.11 - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 - with: - python-version: 3.11.11 - - - name: Install uv - uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0 - with: - enable-cache: true - - - name: Install dev dependencies - shell: bash - run: | - UV_PROJECT_ENVIRONMENT=$pythonLocation uv sync --extra dev + - name: Set up Python dev environment + uses: ./.github/actions/setup-python-dev - name: Lint with ruff run: | @@ -79,20 +55,8 @@ jobs: with: fetch-depth: 1 - - name: Set up Python 3.11 - uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 - with: - python-version: 3.11.11 - - - name: Install uv - uses: astral-sh/setup-uv@cec208311dfd045dd5311c1add060b2062131d57 # v8.0.0 - with: - enable-cache: true - - - name: Install dev dependencies - shell: bash - run: | - UV_PROJECT_ENVIRONMENT=$pythonLocation uv sync --extra dev + - name: Set up Python dev environment + uses: ./.github/actions/setup-python-dev - name: Check types with mypy run: |