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

# Adding Repositories

> Connect GitHub repositories and configure test settings.

Before you can run tests, you need to add a repository and configure its settings.

## Add a Repository

<Steps>
  <Step title="Go to Testing > Repos">
    Navigate to the Testing section and click "Repos"
  </Step>

  <Step title="Click Add Repository">
    Click the "Add Repository" button
  </Step>

  <Step title="Select from GitHub">
    Choose a repository from your connected GitHub account
  </Step>

  <Step title="Configure Settings">
    Set up test runner and environment variables
  </Step>

  <Step title="Save">
    Click "Add Repository" to finish
  </Step>
</Steps>

## Repository Settings

### AI Model

Select which AI model to use for test generation:

| Model            | Description                   | Usage              |
| ---------------- | ----------------------------- | ------------------ |
| **Paragon Fast** | Quick responses, lower cost   | Simple tests       |
| **Paragon MD**   | Balanced performance and cost | Most use cases     |
| **Paragon Max**  | Maximum capability            | Complex test logic |

### Base URL

The URL where your app runs. Required for E2E tests.

```
https://staging.myapp.com
https://myapp.vercel.app
http://localhost:3000
```

### App Path (Monorepos)

If your app is in a subdirectory, specify the path:

```
apps/web
packages/frontend
```

***

## Test Runner Settings

Configure how and when tests run automatically.

### Run on PR

When enabled, code tests run automatically when:

* A new pull request is opened
* New commits are pushed to a PR
* A PR is reopened

Results appear as a GitHub check on the PR.

### Run on Push to Production

When enabled, tests run when code is pushed or merged to your production branch.

1. Enable the toggle
2. Select your production branch (main, master, etc.)

### Open Access

Allow external contributors (outside your organization) to trigger test runs on their PRs.

<Warning>
  Only enable this for public repositories where you want community contributors to run tests.
</Warning>

### Per-Suite Triggers

Control which test suites run on PR vs push:

| Suite       | Run on PR | Run on Push |
| ----------- | --------- | ----------- |
| Auth Tests  | ✓         | ✓           |
| API Tests   | ✓         | ✓           |
| Performance | ✗         | ✓           |

This lets you run fast tests on every PR while reserving slower tests for post-merge.

<Note>
  **E2E tests** (step-based) cannot run on PR events because there's no deployed app to test against. They can only run manually, on schedule, or on push when targeting a production URL.
</Note>

***

## Environment Variables

Add secrets your tests need. Variables are encrypted and only decrypted at runtime.

### Adding Variables

1. Click "Add Variable"
2. Enter the key name and value
3. Paragon auto-detects secrets (names containing "key", "token", "password", etc.)

### Bulk Import

Paste your `.env` file contents to import multiple variables at once:

```
API_KEY=sk-abc123
TEST_USER_EMAIL=test@example.com
TEST_USER_PASSWORD=secretpassword
DATABASE_URL=postgres://...
```

<Warning>
  Never commit secrets to your repository. Use environment variables instead.
</Warning>

***

## Evolving Tests Settings

Configure automatic test updates when code changes. See [Evolving Tests](/dashboard/testing/evolving) for full documentation.

### Enable Evolving Tests

Toggle to enable the evolve feature for this repository.

### Auto-Run on PR

When enabled, Paragon automatically analyzes PRs and proposes test updates. When disabled, manually trigger with `@paragon-evolve` comment.

### Open Access

Allow external contributors to trigger `@paragon-evolve` on their PRs.

### Include Draft PRs

Run evolve analysis on draft PRs (disabled by default).

### Excluded Branches

Branches where evolving tests won't run. Supports wildcards:

```
main
develop
release/*
hotfix/*
```

***

## Managing Repositories

### Edit Settings

Click on any repository to update its settings.

### Remove Repository

Click the delete button to remove a repository. This removes all tests and run history.

<Note>
  Removing a repository from Testing does not affect your actual GitHub repository.
</Note>

## Next Steps

<Card title="Import Tests" icon="file-import" href="/dashboard/testing/importing">
  Import existing tests from your repository
</Card>
