CI now working

This commit is contained in:
Christoph Haas 2025-06-05 01:06:16 +02:00
parent ed31cb4184
commit b013088da4

View file

@ -26,28 +26,28 @@ build:
- main - main
- merge_requests - merge_requests
test: # test:
stage: test # stage: test
image: ruby:3.2.2 # image: ruby:3.2.2
services: # services:
- postgres:latest # - postgres:latest
- docker:20.10.16-dind # - docker:20.10.16-dind
variables: # variables:
POSTGRES_DB: "rails_test" # POSTGRES_DB: "rails_test"
POSTGRES_USER: "postgres" # POSTGRES_USER: "postgres"
POSTGRES_PASSWORD: "password" # POSTGRES_PASSWORD: "password"
DATABASE_URL: "postgresql://postgres:password@postgres:5432/rails_test" # DATABASE_URL: "postgresql://postgres:password@postgres:5432/rails_test"
script: # script:
- apt-get update -qq && apt-get install -y docker.io # - apt-get update -qq && apt-get install -y docker.io
- docker run --rm $CONTAINER_IMAGE bin/rails db:create db:migrate RAILS_ENV=test # - docker run --rm $CONTAINER_IMAGE bin/rails db:create db:migrate RAILS_ENV=test
- docker run --rm $CONTAINER_IMAGE bin/rails test # - docker run --rm $CONTAINER_IMAGE bin/rails test
only: # only:
- main # - main
- merge_requests # - merge_requests
deploy: # deploy:
stage: deploy # stage: deploy
script: # script:
- echo "Deploying to production..." # - echo "Deploying to production..."
only: # only:
- main # - main