summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml15
-rw-r--r--.travis.yml16
-rw-r--r--CLI/ruby/.gitlab-ci.yml46
3 files changed, 61 insertions, 16 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
new file mode 100644
index 0000000..49038d5
--- /dev/null
+++ b/.gitlab-ci.yml
@@ -0,0 +1,15 @@
+stages:
+ - triggers
+
+ruby:
+ stage: triggers
+ trigger:
+ include: CLI/ruby/.gitlab-ci.yml
+ strategy: depend
+ only:
+ refs:
+ - master
+ - branches
+ - merge_requests
+ changes:
+ - CLI/ruby/*
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 6541a49..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,16 +0,0 @@
-language: ruby
-
-ruby:
- - 2.5
- - 2.6
- - 2.7
-
-before_install:
- - gem install bundler
- - cd CLI/ruby
-
-jobs:
- include:
- - stage: lint
- ruby: 2.7
- script: bundle exec rubocop
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