CI/CD pipelines
Continuous integration and deployment pipelines
Zeno's CI pipeline runs on every push to main and on every pull request against it.
CI pipeline
The CI pipeline runs these steps in order:
- Lint: Ultracite checks formatting and lint rules
- Type check: TypeScript checks every package
- Build: Turborepo builds every package and app
- Unit tests: Vitest runs the unit tests
- E2E tests: Playwright runs the end-to-end tests
Run it locally with:
pnpm ciTo rebuild without the cache, run:
pnpm ci:forceTo write a dependency graph to turbo-graph.html, run:
pnpm ci:graphThe root package.json defines these scripts:
{
"scripts": {
"ci": "pnpm run lint && turbo run types:check build test e2e",
"ci:force": "turbo run types:check build test e2e --force",
"ci:graph": "turbo run types:check build test e2e --graph=turbo-graph.html"
}
}Turborepo tasks
turbo.json defines the pipeline order and dependencies.
GitHub Actions
Zeno's GitHub Actions workflow is .github/workflows/turbo.yml.
Caching
Turborepo caches task outputs and replays them when a task's inputs haven't changed:
- A local cache in
.turbo/ - A remote cache on Vercel
Enable remote caching locally with:
npx turbo login
npx turbo linkTo enable remote caching in GitHub Actions, uncomment these lines in .github/workflows/turbo.yml and edit them as needed:
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
TURBO_CACHE: remote:rwE2E in CI
In CI, Playwright runs with these settings:
- An HTML report, which the workflow uploads as an artifact
- 3 retries on failure
- A 30-second timeout (120 seconds locally)
- A trace recorded on the first retry, for debugging
{
forbidOnly: !!process.env.CI,
retries: process.env.CI ? 3 : 0,
reporter: process.env.CI ? "html" : "list",
timeout: process.env.CI ? 30_000 : 120_000,
}