Skip to content

Continuous integration

The kit comes with a GitHub Actions workflow, .github/workflows/ci.yml. It runs on every pull request and on every push to main, and it needs no secrets: push the repository to GitHub and it works.

Three jobs, side by side:

Job What it does
check Installs from the lockfile, starts Postgres and Redis, then bun run check, the API tests again on Prisma and on TypeORM, and bun run build
images Builds the three production images, starts them together, and runs deploy:check against them
acceptance The browser journeys against the production images with stand-ins: both modes on Drizzle, and teams on Prisma, TypeORM and Polar

check is the command you run before a commit, so a pull request fails for the same reasons it would fail on your machine. images catches what tests cannot: a Dockerfile that no longer builds, a migration that fails on an empty database, a container that never becomes healthy. When it fails, the containers’ logs are printed. When a journey fails, its trace and a screenshot are kept with the run. See Test your features.

A new push to a branch cancels the run of the one before it.

The workflow copies .env.example to .env, whose values match the Postgres it starts. Tests never call Stripe, Polar, an email provider or an AI model, and images generates an AUTH_SECRET for the run. See Test your features.

bun run build bundles the mobile app for iOS and Android, so check fails when its code does not bundle. Its flows run on an Android emulator in a workflow of their own, .github/workflows/mobile-flows.yml, which you start by hand from the Actions tab or with gh workflow run mobile-flows.yml. See Test your features. Building the app for testers and the stores is another workflow, which you start by hand: see Mobile builds.

It does not deploy. On Railway, a push to your branch deploys the services whose files changed. To deploy only what passed, turn on Wait for CI in each Railway service’s settings.

  • A new workspace package needs a COPY line for its package.json in each of the three Dockerfiles, or images fails at install.
  • The Bun version is written in the workflow and in the Dockerfiles. Change them together.