summaryrefslogtreecommitdiffstats
path: root/CLI/ruby
diff options
context:
space:
mode:
Diffstat (limited to 'CLI/ruby')
-rw-r--r--CLI/ruby/.gitlab-ci.yml46
1 files changed, 46 insertions, 0 deletions
diff --git a/CLI/ruby/.gitlab-ci.yml b/CLI/ruby/.gitlab-ci.yml
new file mode 100644
index 0000000..f96599c
--- /dev/null
+++ b/CLI/ruby/.gitlab-ci.yml
@@ -0,0 +1,46 @@
+image: ruby:2.7
+
+stages:
+ - build
+ - test
+ - lint
+ - release
+
+variables:
+ BUNDLE_PATH: .bundle/vendor
+
+cache: &cache
+ policy: pull-push
+ key:
+ files:
+ - Gemfile.lock
+ paths:
+ - CLI/ruby/.bundle/vendor
+
+before_script:
+ - cd CLI/ruby
+ - bundle install -j $(nproc)
+
+build:
+ stage: build
+ script:
+ - ruby -v
+ - bundle env
+
+test:
+ stage: test
+ needs: [build]
+ cache:
+ <<: *cache
+ policy: pull
+ script:
+ - bundle exec rspec
+
+lint:
+ stage: test
+ needs: [build]
+ cache:
+ <<: *cache
+ policy: pull
+ script:
+ - bundle exec rubocop