Skip to main content

Documentation Index

Fetch the complete documentation index at: https://trunk-4cab4936-sam-gutentag-flaky-tests-new-monitors.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

This page covers how to make sure your CI checks run on the branches Trunk Merge Queue creates while testing a pull request. What you need to do depends on the testing mode you selected in Configure branch protection:
  • Draft PR mode (default) — no additional CI configuration is required.
  • Push-Triggered mode — you need to add a CI workflow that triggers on pushes to trunk-merge/**.

If using Draft PR mode (default)

Your existing pull request-triggered CI workflows will automatically run when Trunk creates draft pull requests to test changes. No additional configuration is required. See GitHub’s documentation for configuring required status checks on your protected branch: You’re done! Skip to the Verification section.

If using Push-Triggered mode

Set up your CI provider to run status checks whenever Trunk pushes to trunk-merge/** branches. Example for GitHub Actions:
name: Merge Queue Tests
run-name: Merge Queue Checks for ${{ github.ref_name }}

# Trigger when Trunk Merge Queue tests a pull request
on:
  push:
    branches:
      - trunk-merge/**

jobs:
  unit_tests:
    runs-on: ubuntu-latest
    name: Unit Tests
    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Run tests
        run: npm test  # Your actual test commands

  integration_tests:
    runs-on: ubuntu-latest
    name: Integration Tests
    steps:
      - name: Checkout
        uses: actions/checkout@v3

      - name: Run integration tests
        run: npm run test:integration  # Your actual test commands
For other CI providers: Configure workflows triggered by pushes to branches matching trunk-merge/**.

Required Checks During Queue Testing

By default, Merge Queue waits on the same required status checks defined in your GitHub branch protection rules while testing a PR. If you want a different set of checks required during queue testing — for example, because you don’t use GitHub branch protection, or because the queue should require different checks than PR review — you can override that in the Trunk UI or in .trunk/trunk.yaml (merge.required_statuses). Both overrides work in either testing mode.
These checks are what Merge Queue waits on while a PR is already in the queue and testing. They do not control which PRs are admitted into the queue.
PR admission is governed separately: Trunk waits until GitHub considers the PR ready to merge (driven by your branch protection rules) before testing begins. If your queue is running in parallel mode, Trunk additionally waits for the impacted targets of that PR to be uploaded. See Required Status Checks for the full set of options.

Next Steps

Test your setup - Verify everything is configured correctly before using Merge Queue in production. Having trouble? See our Troubleshooting guide for common installation issues.