Skip to main content

🚀 Early Agent Onboarding

This section guides you through onboarding Early in two clear phases, using real CI examples.

The goal is to help you:

  • Integrate Early safely and incrementally
  • Validate test generation before enabling automation
  • Move from a single-file test run to full PR or commit-based workflows

Each phase includes ready-to-use examples, tailored to different CI systems and SCM providers.


🧩 Onboarding Overview

Phase 1 — Initial Integration (Single File)

Goal:
Verify that Early can run successfully in your environment and generate tests for a single file.

In this phase:

  • Early is invoked via a CI action (depending on your CI system)
  • Test generation is scoped to a single file
  • An API key is provided manually
  • Automation is intentionally limited

Once this phase succeeds, you’re ready to move to full automation.


Phase 2 — Automated Test Generation (PRs or Commits)

Goal:
Enable Early to run automatically on pull requests or commits.

In this phase:

  • Early is triggered by a PR or commit hook
  • Test generation is scoped to changed files
  • Tests are committed back automatically
  • Early becomes part of your CI workflow

🧭 How to Use This Section

  1. Start with Phase 1 for your CI system
  2. Run Early on a single file and validate the results
  3. Move to Phase 2 and enable PR- or commit-based automation

Each example is self-contained and focuses only on what’s required for that phase.


🧪 Phase 1 — Initial Integration Examples

These examples demonstrate running Early inside your CI system, generating tests for a single, representative file as the first integration step.

In this phase:

  • Early runs as a CI action (job / pipeline / workflow, depending on the CI system)
  • Execution is manually triggered
    (for example: GitHub workflow_dispatch, a manually triggered Jenkins job, or a parameterized pipeline in other CI systems)
  • Test generation is scoped to one medium-sized file
    (not too small to be trivial, and not too large to complicate initial validation)
  • The goal is to validate configuration, permissions, and environment setup — not test coverage quality

Manual Integration Workflows

These examples follow the Integration Guide and are designed to be executed on demand before moving to PR- or commit-based automation.


🔁 Phase 2 — Automated CI Examples

These examples show how to run Early automatically as part of your CI pipeline.

Pull Request–Based Workflows

Commit-Based Workflows


📌 Notes

  • The term action refers to the CI-specific execution unit (job, pipeline, workflow, etc.).
  • Each example uses the same underlying Early CLI, adapted to the CI system.
  • More CI systems, SCM providers, and onboarding paths will be added over time.

If you’re unsure which example to start with, begin with Phase 1 and validate test generation on a single file before enabling automation.