DocsRecipes

GitLab CI

Same pattern as the GitHub Actions recipe, in GitLab CI syntax.


The seedkit invocation is identical across CI providers. Only the YAML wrapper differs.

test:
  image: node:20
  services:
    - postgres:16
  variables:
    POSTGRES_DB: testdb
    POSTGRES_PASSWORD: postgres
    DATABASE_URL: "postgres://postgres:postgres@postgres:5432/testdb"
  script:
    - npm ci
    - npx prisma migrate deploy
    - npx seedkit-cli seed
        --url $DATABASE_URL
        --schema prisma/schema.prisma
        --seed test-fixture --from-cache --reset
    - npm test

Set SEEDKIT_TOKEN as a project CI/CD variable. Mark it Masked + Protected so it doesn't leak into job logs and only protected refs can read it.

See also