ENGINEERING

Run only the affected test suite for a GitLab dependency MR

Instead of running the whole CI suite on a dependency bump, this triggers a targeted GitLab pipeline scoped to just the tests that exercise the changed packages.

CategoryEngineering
Enginesim
Difficultyadvanced
Triggerwebhook
Steps6
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerGitLab MR webhook on dependency-bump branchGitLabGitLab
  • ActionExtract changed packages from lockfile diffGitLabGitLab
  • ActionResolve affected test targets from dependency graphPostgreSQLPostgres
  • ActionTrigger scoped GitLab pipeline with job filterGitLabGitLab
  • LogicWait for pipeline result
  • OutputPost pass/fail status and gate label on MRGitLabGitLab

What it does

A full CI run on every Renovate MR wastes minutes and money. This workflow computes the minimal set of test jobs that actually cover the bumped dependency, triggers a scoped GitLab pipeline against that subset, and reports pass/fail back to the MR as a gate.

When to use it

Use it when your monorepo CI is slow and most dependency MRs only touch a corner of the codebase. It cuts feedback time from 30 minutes to a couple, while still proving the bump is green where it matters.

How it works

  1. 1A GitLab MR webhook fires for a branch matching your dependency-bump naming convention.
  2. 2The workflow extracts the changed packages from the lockfile diff.
  3. 3It queries Postgres for the test targets that transitively depend on those packages and builds a job filter.
  4. 4An action triggers a new GitLab pipeline with that filter passed as a CI variable, so only the affected jobs run.
  5. 5A logic step waits for the pipeline result.
  6. 6On green it posts a passing status and a `dep:tests-green` label; on red it posts the failing job links and blocks the MR.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect GitLabRepos, MRs, pipelines, registry.
  2. 2
    Connect PostgresAny Postgres URL — query, write, migrate.
  3. 3
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  4. 4
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  5. 5
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.