From 1ccd7042f7f0b2f7b92e90b53f85042f24f85592 Mon Sep 17 00:00:00 2001
From: Felix Eckhofer <felix@eckhofer.com>
Date: Mon, 10 Mar 2025 10:23:50 +0100
Subject: [PATCH] Run rubocop from CI

---
 .gitlab-ci.yml | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index e11663d..3d0dcd5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,8 +1,22 @@
-docker-build:
+rubocop:
+  image: registry.docker.com/library/ruby:3.4.2
+  stage: test
+  cache:
+    paths:
+      - vendor/bundle
+  before_script:
+    - ruby -v
+    - bundle config set --local deployment true  # Install dependencies into ./vendor/bundle
+    - bundle config set --local with test        # bundle install --with=test
+    - bundle install -j $(nproc)
+  script:
+    - bundle exec rubocop
+
+docker-image:
   image:
     name: gcr.io/kaniko-project/executor:v1.23.2-debug
     entrypoint: [""]
-  stage: build
+  stage: deploy
   variables:
     DOCKER_IMAGE_NAME: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
   script:
@@ -15,3 +29,4 @@ docker-build:
     - if: $CI_COMMIT_BRANCH
       exists:
         - Dockerfile
+
-- 
GitLab