Skip to content

Use reusable workflow to eliminate setup duplication between test and collateral#199

Merged
jaraco merged 3 commits into
mainfrom
copilot/explore-reusable-workflows
Jul 12, 2026
Merged

Use reusable workflow to eliminate setup duplication between test and collateral#199
jaraco merged 3 commits into
mainfrom
copilot/explore-reusable-workflows

Conversation

Copilot AI commented Apr 27, 2026

Copy link
Copy Markdown
Contributor

test and collateral jobs duplicated setup steps, making it easy to add a workaround to one but forget the other — critical because diffcov in collateral actually runs the tests and needs identical setup.

Changes

  • New .github/workflows/test-suite.yml — reusable workflow_call workflow encapsulating all shared logic:

    • Inputs: python (default 3.x), platform (default ubuntu-latest), tox-env (default empty)
    • fetch-depth: 0 (required for diffcov)
    • Conditional system dep install for Python 3.15/ubuntu (now applies to both test and diffcov automatically)
    • Setup Python → install tox → run tox or tox -e <env> based on tox-env input
    • Shared env vars (FORCE_COLOR, TOX_OVERRIDE, etc.)
  • Updated main.yml — both test and collateral now delegate to the reusable workflow:

test:
  strategy:
    matrix: { python: [...], platform: [...] }
  uses: ./.github/workflows/test-suite.yml
  with:
    python: ${{ matrix.python }}
    platform: ${{ matrix.platform }}
  continue-on-error: ${{ matrix.python == '3.15' }}

collateral:
  strategy:
    matrix: { job: [diffcov, docs] }
  uses: ./.github/workflows/test-suite.yml
  with:
    platform: ubuntu-latest
    tox-env: ${{ matrix.job }}

Copilot AI linked an issue Apr 27, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Explore reusable workflows for shared CI behavior Use reusable workflow to eliminate setup duplication between test and collateral Apr 27, 2026
Copilot AI requested a review from jaraco April 27, 2026 16:22
Comment thread .github/workflows/test-suite.yml
Copilot AI requested a review from jaraco April 27, 2026 16:28

@webknjaz webknjaz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jaraco jaraco marked this pull request as ready for review July 12, 2026 17:09
@jaraco jaraco merged commit 384acd9 into main Jul 12, 2026
@jaraco jaraco deleted the copilot/explore-reusable-workflows branch July 12, 2026 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tests and collateral share some behavior implicitly

3 participants