This documentation is for a legacy version of Remix Supabase. For the latest version, please visit the Remix Supabase Turbo documentation

CI Tests

Learn how to test your Makerkit in your CI

To run your tests in any CI, we recommend you simply run the following command:

npm test:e2e

This command takes care of running all the required services, importing the test data, executing the tests and then exiting.

The Makerkit testing pipeline

As mentioned in the previous section, testing a Makerkit requires a few services to be up and running:

  • the Remix server
  • the Supabase dev environment

While executing these tests in your CI, this can get cumbersome. Therefore, we provided a single script to execute all your tests in one simple command: you can find the script at scripts/, which will contain the following content:

set -e npm run supabase:start -x studio,migra,deno-relay,pgadmin-schema-diff,imgproxy & docker run --add-host=host.docker.internal:host-gateway --rm -it -d stripe/stripe-cli:latest listen --forward-to http://host.docker.internal:3000/resources/stripe/webhook --skip-verify --api-key "$STRIPE_SECRET_KEY" --log-level debug dotenv -e .env.test npm run build dotenv -e .env.test npm run start & dotenv -e .env.test npm run cypress:headless npm run supabase:stop -- --no-backup exit 0

Running the Tests in CI mode

If you were to run the tests in CI mode, you would need to run the following command:

dotenv -e .env.test npm run test:remix & dotenv -e .env.test npm run cypress:headless

Then, you would need to stop the Supabase environment:

npm run supabase:stop

Since the DB gets updated, reset it to the initial state:

npm run supabase:reset

Subscribe to our Newsletter
Get the latest updates about React, Remix, Next.js, Firebase, Supabase and Tailwind CSS