Skip to content

CI: select the PostgreSQL, SQL Server, consumer and pack lanes from a derived map #12

Open

Description

@CaffeinatedCoder

Note 2026-11-11. Written for CaffeinatedCoder/EFCore.ComplexIndexes's lanes; the numbers below are from there. Here it applies once this repository has PostgreSQL, SQL Server, consumer and pack lanes (#5).


Problem

Every PR runs every lane. Of the 42 merged PRs since 2026-06-02, 14 changed only docs or tests and still ran Integration, Consumer and Pack: 53 of 245 runner-minutes (22%), and about 1 minute of a 2.2-minute median wall-clock run. That alone is not worth it, because the minutes are free for a public repository.

CaffeinatedCoder/EFCore.ComplexIndexes#100 changes the balance. A SQL Server 2022 container lane on every PostgreSQL-only, docs or test-only PR costs every author its start-up and run time, and CaffeinatedCoder/EFCore.ComplexIndexes#101 adds work to the PostgreSQL lane.

Change

  • A Scope job outputs true or false per lane: postgres, sqlserver, consumer, pack.
    • On any event other than pull_request, it selects every lane.
    • On a PR, it takes git diff --name-only --no-renames against the merge base and matches each path against .github/ci-lanes.json. The first match decides: a global file (Directory.Build.props, *.csproj, *.slnx, .github/workflows/**, the selector and map) selects every lane; a claimed path selects its lanes; an inert path (docs/**, *.md) selects nothing extra; anything else selects every lane.
    • Any error exits non-zero, and the gate (CI: one gate job as the only required build check EFCore.ComplexIndexes#110) then fails.
  • A convention test derives the map from MSBuild, so it is never hand-kept. Each lane gets its test projects' ProjectReference closure, project directories, linked items and imported props, and the test checks that every lane has a job whose if: reads it. While one test project holds both suites, any change under test/ selects both container lanes. The SQL Server suite must be its own project (Tests: a SQL Server integration lane that applies migrations to a live server EFCore.ComplexIndexes#100) for the map to tell the lanes apart.
  • Pack needs Test and Integration, so it gets an explicit !cancelled() condition. Otherwise it is skipped whenever a lane it needs is skipped, and the skip counts as passing.
  • Push, release (Release: run the full CI before publishing, and a nightly full run EFCore.ComplexIndexes#111), nightly and dispatch always run every lane. The push run replays the merged PR's selection and reports a selection escape if a lane fails that the PR would have skipped.

Done when

The SQL Server lane is skipped on a PostgreSQL-only PR and runs on a core or SqlServer change. Each of these seeds fails CI: a file renamed out of src/, a failing Scope, a misspelled lane output, and Pack skipped behind an unselected lane.

Activity

  1. added
    chore
    area/release
    on Oct 20, 2026
  2. CaffeinatedCoder commented on Oct 20, 2026

    @CaffeinatedCoder
    OwnerAuthor

    Moved here from CaffeinatedCoder/EFCore.ComplexIndexes#100 on 2026-10-20: the SQL Server lane landed in CaffeinatedCoder/EFCore.ComplexIndexes#120 as SqlServerIntegrationTests inside EFCore.ComplexIndexes.Tests (TestCategory Integration + SqlServer), with its own job Integration (SQL Server 2022); the PostgreSQL job filters TestCategory!=SqlServer. Splitting it into its own test project, and requiring it through the CI gate (#110) rather than as a required check of its own, belongs with this lane map. Until then the job is not a required check.

  3. added this to the 11.0.0 milestone on Oct 20, 2026
  4. CaffeinatedCoder commented on Oct 20, 2026

    @CaffeinatedCoder
    OwnerAuthor

    Moved to 11.0.0 under the SchemaKit epic (#37) on 2026-10-20, by the maintainer's decision. After the v5.5.0 tag, release/5.x takes fixes only and sees few PRs, so selecting lanes saves little there (53 runner-minutes over 42 PRs measured here). The PR volume is on main, which becomes SchemaKit. This issue also carries the split of the SQL Server lane into its own test project, moved here from CaffeinatedCoder/EFCore.ComplexIndexes#100. On 5.x the lane stays in the shared project. CaffeinatedCoder/EFCore.ComplexIndexes#110's gate job makes it required without its own required check.

  5. added
    chore
    area/release
    on Nov 11, 2026
  6. added this to the 11.0.0 milestone on Nov 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/releasechore

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions