Integration tests
Integration workflows verify that an engine or Rails gem works outside its own repository. They check out the exact caller commit, install it from a local path, prepare a host, and run the host test suite.
The main lesli-ci-engine.yaml workflow composes both integration strategies. They can also be called directly when a repository needs a specialized CI layout.
Strategies
| Workflow | Host | Database | Best for |
|---|---|---|---|
lesli-test-integration.yaml | Existing LesliBuilder checkout | SQLite configuration from LesliActions | Compatibility with the real development host |
lesli-test-integration-new.yaml | Newly generated Rails application | PostgreSQL 16 | Missing dependencies, installation assumptions, and clean-host compatibility |
These strategies are complementary. Passing inside LesliBuilder proves ecosystem compatibility; passing inside a new application proves the module can be assembled without undeclared help from the development monorepo.
Real LesliBuilder host
The real-host workflow:
- Validates that
module-directoryisenginesorgems. - Checks out the selected LesliBuilder ref at the workspace root.
- Checks out the exact caller commit into the selected module directory.
- Checks out Lesli core unless Lesli itself is under test.
- Loads the shared Gemfile and SQLite database configuration from LesliActions.
- Adds the caller to
Gemfile.lesliwhen it is not already declared. - Installs dependencies and rebuilds the test database.
- Runs the complete host suite with
LESLI_INTEGRATION_TEST=true.
Direct usage:
jobs:
integration:
uses: LesliTech/LesliActions/.github/workflows/lesli-test-integration.yaml@master
with:
ruby-version: "3.3.5"
module-directory: "engines"
builder-ref: "master"
lesli-ref: "master"
actions-ref: "master"
Inputs
| Input | Default | Purpose |
|---|---|---|
ruby-version | 3.3.5 | Ruby used by the host. |
module-directory | engines | Caller destination: engines or gems. |
builder-ref | master | LesliBuilder host branch, tag, or commit. |
lesli-ref | master | Lesli core branch, tag, or commit. |
actions-ref | master | LesliActions configuration branch, tag, or commit. |
Newly generated Rails host
The new-host workflow:
- Starts PostgreSQL 16.
- Validates
module-directory. - Installs the requested Ruby and exact Rails version.
- Generates
LesliAppwithout installing dependencies yet. - Checks out the exact caller commit, Lesli core, and LesliActions configuration inside the application.
- Adds
Gemfile.lesliand the PostgreSQL test configuration. - Installs dependencies once every local path is ready.
- Rebuilds the database and eager loads the application.
- Runs the generated application's tests with
LESLI_INTEGRATION_TEST=true.
Direct usage:
jobs:
integration-new:
uses: LesliTech/LesliActions/.github/workflows/lesli-test-integration-new.yaml@master
with:
ruby-version: "3.3.5"
rails-version: "8.1.4"
module-directory: "engines"
lesli-ref: "master"
actions-ref: "master"
Inputs
| Input | Default | Purpose |
|---|---|---|
ruby-version | 3.3.5 | Ruby used to generate and test the host. |
rails-version | 8.1.4 | Exact Rails version installed for generation. |
module-directory | engines | Caller destination: engines or gems. |
lesli-ref | master | Lesli core branch, tag, or commit. |
actions-ref | master | LesliActions configuration branch, tag, or commit. |
Ref selection
Integration refs are independent:
builder-refselects the real host baseline.lesli-refselects Lesli core.actions-refselects shared Gemfile and database configuration.
Use commits or release tags when reproducing a historical failure. Use branches when validating coordinated changes across repositories.
There is no branch input for the module under test. GitHub's checkout action uses the caller repository and the exact commit associated with the workflow run, so pull requests are tested without guessing a branch name.
Last Update: 2026/10/20