From 05bc91b9cd2e7774434e12b62699387daa9ed0b6 Mon Sep 17 00:00:00 2001 From: Darius Schneider <schneider@itc.rwth-aachen.de> Date: Thu, 26 Sep 2024 14:18:47 +0200 Subject: [PATCH] ci --- rails/gitlab-ci.yml | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/rails/gitlab-ci.yml b/rails/gitlab-ci.yml index 7c067ce..75b0ca1 100644 --- a/rails/gitlab-ci.yml +++ b/rails/gitlab-ci.yml @@ -1,9 +1,8 @@ -variables: - CI: "true" - RAILS_ENV: test - set_ruby_version: stage: build + variables: + CI: "true" + RAILS_ENV: test script: - echo "RUBY_VERSION=$(cat .ruby-version | sed 's/ruby-//g')" >> build.env artifacts: @@ -13,6 +12,9 @@ set_ruby_version: rubocop: stage: test image: ruby:$RUBY_VERSION + variables: + CI: "true" + RAILS_ENV: test tags: - rails script: @@ -23,6 +25,9 @@ rubocop: erb_lint: stage: test image: ruby:$RUBY_VERSION + variables: + CI: "true" + RAILS_ENV: test tags: - rails script: @@ -34,6 +39,9 @@ erb_lint: haml_lint: stage: test image: ruby:$RUBY_VERSION + variables: + CI: "true" + RAILS_ENV: test tags: - rails script: @@ -44,6 +52,9 @@ haml_lint: brakeman: stage: test image: ruby:$RUBY_VERSION + variables: + CI: "true" + RAILS_ENV: test tags: - rails script: @@ -52,13 +63,15 @@ brakeman: - brakeman -A --except UnscopedFind rails_test: - image: ruby:$RUBY_VERSION stage: test + image: ruby:$RUBY_VERSION tags: - rails services: - postgres:16.4 variables: + CI: "true" + RAILS_ENV: test POSTGRES_DB: postgres POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres -- GitLab