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

# Builds from your repository

> Connect GitHub, GitLab or Bitbucket and Mini compiles your iOS and Android app from the commit each run needs.

Connect your repository and Mini builds the app itself, from the exact commit a run is about. This page covers how Mini picks that commit, the settings that shape the build, and what to do when a build fails. Building on your own CI instead? See [Upload a build](https://www.minitap.ai/docs/minitest/setup/upload-a-build.md).

| Where | Setting | What it does |
| - | - | - |
| **Builds** | **Repository** | The GitHub, GitLab or Bitbucket repository Mini pulls the code from. |
| **Builds** | **Default branch** | Builds and maintenance run against this branch. |
| **Builds** | **Source folder** | Where the app lives in the repository. **Repository root** unless you pick a subfolder. |
| **Builds** | **Build environment variables** | Values injected at build time and baked into the binary. |
| **Builds** | **Build instructions** | Anything Mini can't work out on its own, like a codegen step before `xcodebuild`. |

All of them live in your app's **Builds & test data → Builds**. Until a repository is linked, the page shows **Builds are locked**.

## Connect the repository

**1. Connect your Git provider once**

In **Settings → Integrations**, connect GitHub, GitLab or Bitbucket. On GitHub this installs the Minitap GitHub App on your org, see [GitHub](https://www.minitap.ai/docs/minitest/integrations/github.md). A self-hosted GitLab instance works too.

**2. Link the app to its repository**

In the app's **Builds & test data → Builds**, click **Link** next to **Repository** and pick it from your connections. Set the **Default branch**.

**3. Point Mini at the app in a monorepo**

If the app lives in a subfolder, click **Browse** next to **Source folder** and pick it from the repository tree. On pull requests, Mini then only shows up when a change touches that folder.

![Builds & test data, Builds: the repository, the default branch main and the source folder Repository root](https://mintcdn.com/minitap-30239763/QCLbAMcddko_3eZy/minitest/images/app/builds-repo.png?fit=max\&auto=format\&n=QCLbAMcddko_3eZy\&q=85\&s=9cb63708daab1dc67d59337492af95e7)

The repository, branch and folder Mini builds from.

## Which commit Mini builds

Mini builds when a run needs a fresh build, from the commit that run is about:

| How the run starts | Commit Mini builds |
| - | - |
| **Run tests** in the dashboard, with **Build from GitHub…** (or GitLab, Bitbucket) in the build cell | The branch and commit you pick in the dialog. By default, the latest commit. Every platform set to build from the repository uses the same commit. |
| A pull request, through the [PR check](https://www.minitap.ai/docs/minitest/runs/pull-request-checks.md) or the GitHub Action | The commit that triggered the run. |
| A [schedule](https://www.minitap.ai/docs/minitest/runs/schedules.md) on a branch | The latest commit of that branch, built before each run. |
| The CLI | The commit you pass. |

```bash theme={"theme":{"light":"github-light","dark":"vesper"}}
# Build a commit without running anything (SHA optional: defaults to the default branch's latest commit)
minitest --app <app_id> build from-commit <full_sha> --platform ios --platform android

# Build a commit and run its suite
minitest --app <app_id> run from-commit <full_sha>
```

The SHA must be the full 40-character one. Mini reuses work from earlier builds when it can; add `--force-full` to `build from-commit` to start from scratch.

A build Mini made shows as **Auto-built** in the run's build cell. iOS builds from the repository are simulator builds, so they run on cloud simulators. Android builds from the repository run on cloud emulators and on physical Android phones. To test on a physical iPhone, use a TestFlight link or an Ad Hoc build, see [Upload a build](https://www.minitap.ai/docs/minitest/setup/upload-a-build.md#physical-iphones-testflight-and-ad-hoc).

## Build environment variables

Most mobile builds need a few values to compile: an API base URL, a crash-reporting key, a feature switch. Mini stores them per app and injects them at build time.

Open **Builds & test data → Builds → Build environment variables → Edit variables**. Add, edit or remove rows, or paste a whole `.env` file into any key field to fill several rows at once. Changes apply to the next build.

```env theme={"theme":{"light":"github-light","dark":"vesper"}}
API_URL=https://staging.example.com
SENTRY_DSN=https://abc@sentry.io/123
FEATURE_CHECKOUT_V2=true
```

Values are stored **Encrypted**.

## Build options

These switches sit under the build instructions. They change the build itself, so they apply to builds from your repository only.

> [accordion] Patch RevenueCat
>
> Reaches paywalled flows without real purchases, against RevenueCat's [Test Store](https://www.revenuecat.com/docs/test-and-launch/sandbox/test-store). It works for React Native and Expo apps using `react-native-purchases`, on iOS and Android.
>
> 1. Create a Test Store in your RevenueCat project and copy its `test_` API keys.
> 2. Put those keys in your build environment variables, under the names your app reads its RevenueCat keys from. Your app must read the key from configuration so production builds keep the production key.
> 3. Turn on **Patch RevenueCat**.
>
> Mini patches the native project inside the build only; your source code stays as it is. This option is experimental: if builds start failing after you turn it on, turn it off and tell us, and we'll adapt the patch to your app.

> [accordion] Disable looping animations
>
> On by default for Expo and React Native apps. It stops endless animations from being read as a loading state: `Animated.loop` settles on its first frame and Reanimated's `withRepeat` runs one cycle. Transitions, gestures and animations that end on their own keep working. Turn it off if your app needs a looping animation to keep running during a run.

> [accordion] iOS simulator patches
>
> Some apps also see two options that only touch simulator builds: **Patch the camera for simulators (simulator builds only)** lets `expo-camera` scanners see the simulator's virtual camera, so QR and barcode flows can be tested, and **Mock Apple Family Controls (simulator builds only)** replaces Apple's Screen Time frameworks with a test mock so parental-control flows run without Apple child or parent accounts. Device builds are never patched. See [Devices](https://www.minitap.ai/docs/minitest/setup/devices.md#known-limits).

## Android signing

Mini signs the Android builds it makes with a debug key dedicated to the app. **Builds & test data → Builds → App signing** shows its **SHA-1**, **SHA-256** and **Key alias**.

If your app uses Google sign-in, register that SHA-1 in Google Cloud Console or your Firebase project, or sign-in fails on Mini's builds. Regenerating the key changes the SHA-1: register the new one and rebuild. Need the keystore itself, for a Play Store upload? Contact Minitap and we export it securely.

iOS builds from the repository are simulator builds, so they need no signing.

## When a build fails

The run shows **BUILD FAILED** and no scenario runs: the build failed before any test ran, so no credits are used. The failure panel tells you what went wrong:

* A label for the kind of failure: **Configuration**, **Source code** or **Infrastructure**.
* A **Suggested remediation**, and a **Fix prompt for your AI tool** with a **Copy fix prompt** button.
* **View raw logs**, for the full build output.

Fix the cause (often a missing build environment variable or a step to add to **Build instructions**), then click **Retry build**. It re-runs the impacted scenarios on the same commit. From the CLI, `minitest build list --status failed` lists failed builds with the same guidance.

An **Infrastructure** failure usually has nothing to do with your code: retry, and tell us if it keeps happening. A repository disconnected from your Git provider fails every build until you reconnect it.

## Next steps

> [card] [Upload a build](https://www.minitap.ai/docs/minitest/setup/upload-a-build.md)
>
> Bring your own `.ipa`, `.apk` or `.aab`, or a TestFlight link.

> [card] [Devices](https://www.minitap.ai/docs/minitest/setup/devices.md)
>
> Simulators, emulators and physical phones, and how a run picks one.

> [card] [Pull request checks](https://www.minitap.ai/docs/minitest/runs/pull-request-checks.md)
>
> Build and test every pull request before it merges.

> [card] [Web apps](https://www.minitap.ai/docs/minitest/setup/web-apps.md)
>
> Preview URLs and browsers for web apps.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.