Seeding auth.users with Gitlab CI/CD job
Hi all.
I am adding a DB testing job to my CI/CD pipelin in GitLab.
Following this guide -> https://supabase.com/docs/guides/database/testing I was able to correctly add a dozen of DB tests that run correctly locally.
Now, starting from this guide -> https://supabase.com/docs/guides/deployment/ci/testing I am trying to adapt the pipeline for a GitLab CI/CD job.
This is the code from my YAML file:
The job runs correctly, but I am having an issue.
During the
The job exits with error
Anybody knows what' the best approach in this case?
I tried to set an high level role (e.g.
).
Any help wuold be much appreciated.
Thanks in advance,
Francesco
I am adding a DB testing job to my CI/CD pipelin in GitLab.
Following this guide -> https://supabase.com/docs/guides/database/testing I was able to correctly add a dozen of DB tests that run correctly locally.
Now, starting from this guide -> https://supabase.com/docs/guides/deployment/ci/testing I am trying to adapt the pipeline for a GitLab CI/CD job.
This is the code from my YAML file:
The job runs correctly, but I am having an issue.
During the
supabase db start phase, the CLI correctly applies all migrations and runs my seed.sql file, that manipulates the auth.users tableThe job exits with error
ERROR: must be owner of table users (SQLSTATE 42501).Anybody knows what' the best approach in this case?
I tried to set an high level role (e.g.
SET ROLE supabase_auth_admin;) in the seed file, but this operation is denied due to missing permissions (and also I don't think is a best practice Any help wuold be much appreciated.
Thanks in advance,
Francesco
Run your tests when you or your team make changes.
