#CI Setup
1 messages · Page 1 of 1 (latest)
Hi @old wing. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
Trigger.dev currently supports two main environments: prod (production) and staging. There is no mention of a dedicated "test" or "ci" environment in the knowledge sources. For CI setups (including GitHub Actions), the recommended approach is to use the staging environment for testing purposes. You can deploy to staging using:
npx trigger.dev deploy --env staging
Each environment (prod, staging) has its own API key, which you use to trigger tasks in that environment. This allows you to run your end-to-end (e2e) tests, including background jobs, in isolation from production. Multiple environments beyond prod and staging are on the roadmap, but not currently available Staging deploys How it works: environments.
For CI (e.g., GitHub Actions), you should set the appropriate environment variables (TRIGGER_API_URL, TRIGGER_ACCESS_TOKEN) to point at your self-hosted or cloud instance. This is necessary because login profiles are not available in CI environments Self-hosting CI.
If you are using Playwright for e2e tests and those tests trigger background jobs, you can safely use the staging environment for this purpose. There is no explicit support for a "test" or "ci" environment, so staging is the recommended and supported approach.
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
@old wing Kapa.ai is still learning and improving, please let me know how I did by reacting below.
@old wing in v4 we have "Preview branches" so you can create a CI one if you want.
It would be really nice to have a full example,
Vercel + DB + Trigger + Github Actions and how you recommend setting it up