This is an example of how to setup Momentic tests to run on every pull request and commit to main using CircleCI. Make sure to set MOMENTIC_API_KEY in your project settings.

config.yml
version: 2.1

jobs:
  e2e:
    docker:
      - image: cimg/node:18.16.1

    steps:
      - checkout

      - run:
          name: Install dependencies
          command: npm install

      - run:
          name: Install browsers
          command: npx momentic install-browsers

      - run:
          name: Run Momentic tests
          command: npx momentic run ./momentic --start "npm run start" --wait-on localhost:3000 --api-key ${MOMENTIC_API_KEY}

workflows:
  ci:
    jobs:
      - e2e