Source: https://seerepo.com/learn/automatic-tests-with-one-prompt
Markdown source: https://seerepo.com/learn/automatic-tests-with-one-prompt.md
Description: No automatic tests yet? Health hands you a prompt that has your agent set them up on GitHub Actions.

# Get automatic tests with one prompt

Automatic tests run every time someone pushes, and tell you when something broke. If your repo doesn't have them yet, Health gives you the prompt that sets them up.

## Why this matters

Without automatic tests, a broken change only shows up when someone uses it. With them, every push gets checked, and SeeRepo can show you which commit turned them red and which part it may come from.

## Why most tools can't tell you

Setting them up means writing a workflow file, picking the right install command and choosing what to check. It's a few minutes of work for an agent, but you have to know what to ask for.

## How SeeRepo does it

When your automatic tests (CI) don't report to GitHub, Health says so and offers one button. The prompt behind it is fixed and works with any agent:

```text
Set up automatic tests (CI) for this repository on GitHub Actions. Add .github/workflows/ci.yml that runs on every push and pull request, installs the dependencies with the package manager the repo already uses (with caching), and runs the type check, the linter and the tests. If the repo has no tests yet, add a first test for its most important flow. Make the workflow fail on any error and keep it under five minutes. Then open a pull request and tell me what it checks.
```

## How to do it

1. Open **Health** (key **1**) and go to **Tests**. If your tests don't run on their own with every push, on top you'll read **They don't run on their own**: "If a change breaks something, you find out when it happens to someone".
2. Click **Copy prompt to make them run on their own**.
3. Paste it into your agent. It adds `.github/workflows/ci.yml` and opens a pull request.
4. Merge it. From then on, Journey says the day your tests broke and the day they passed again, and Health opens a task when the tests fail, with the files of the commit that broke them.

See [Health](/docs/health) and [Journey](/docs/metrics).

> Next idea: see where your agents' work landed this week. Read [See what your agents changed this week](/learn/what-your-agents-changed).
