Is there an equivalent in GitLab Docker CI? How can I initialize and setup my postgres database service so that I can have the correct database to test against in my different CI builds/stages.
image: node:latest
services: ["postgres:latest"]
# Needs correct schema to test against, but uses base clean postgres service instead
run_unit_tests:
stage: test
script:
- npm i
- npm test
@alallier how did you figure out how to initialize your db? I added postgres as a service, but when I try to find it using which psql it’s not available and my build fails.
I know this is an old one, but for anyone out there still facing this problem, the workaround I used for this was to install the psql tool in a ‘before_script’ block and execute my init script there.