.gitlab-ci.yml in dri-0.1.2 vs .gitlab-ci.yml in dri-0.1.3
- old
+ new
@@ -1,28 +1,40 @@
-image: ruby:3.0.2
+.job_base:
+ image: ruby:3.1
+ variables:
+ BUNDLE_PATH: vendor/bundle
+ BUNDLE_SUPPRESS_INSTALL_USING_MESSAGES: "true"
+ before_script:
+ - bundle install
+ cache:
+ key:
+ files:
+ - dri.gemspec
+ - Gemfile.lock
+ paths:
+ - vendor/bundle
+ rules:
+ - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH'
+ - if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
+include:
+ - project: gitlab-org/quality/pipeline-common
+ ref: 0.3.4
+ file:
+ - /ci/gem-release.yml
+
stages:
- build
- test
- deploy
-before_script:
- - gem install bundler:2.2.22
- - bundle install
-
build_gem:
stage: build
+ extends: .job_base
script:
- gem build
rspec:
stage: test
+ extends: .job_base
script:
- bundle exec rspec
-
-deploy:
- stage: deploy
- script:
- - gem push dri*.gem
- rules:
- - if: '$CI_COMMIT_TAG'
- when: always
\ No newline at end of file