> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trunk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Configure CI status checks

> Make sure your CI runs whenever Trunk Merge Queue tests a pull request.

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](./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/**`.

## Prerequisites

* Completed [Install the GitHub App and create a queue](./install-and-create-your-queue) and [Configure branch protection](./configure-branch-protection)
* The testing mode chosen during branch protection setup (Draft PR or Push-Triggered) — you need to know which path applies
* Write access to your CI provider's workflow configuration (e.g., `.github/workflows/` for GitHub Actions)

### If using Draft PR mode (default) <a href="#if-using-draft-pr-mode-default" id="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:

* [Classic branch protection rules](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches#require-status-checks-before-merging)
* [Rulesets](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/about-rulesets)

**You're done!** Skip to the [Verification](./test-your-setup) section.

### If using Push-Triggered mode <a href="#if-using-push-triggered-mode" id="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:**

```yaml theme={null}
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 <a href="#required-checks-during-queue-testing" id="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.

<Info>
  **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.**
</Info>

PR admission is governed separately: Trunk waits until GitHub considers the PR ready to merge (driven by your [branch protection rules](./configure-branch-protection#how-branch-protection-affects-the-queue)) before testing begins. If your queue is running in [parallel mode](../optimizations/parallel-queues/index), Trunk additionally waits for the [impacted targets](../optimizations/parallel-queues/index#what-are-impacted-targets) of that PR to be uploaded.

See [Required Status Checks](../administration/advanced-settings#required-status-checks) for the full set of options.

### Next Steps

→ [**Test your setup**](./test-your-setup) - Verify everything is configured correctly before using Merge Queue in production.

*Having trouble?* See our [Troubleshooting guide](../reference/troubleshooting) for common installation issues.
