default: image: ruby:2.7 workflow: rules: # For merge requests, create a pipeline. - if: '$CI_MERGE_REQUEST_IID' # For `master` branch, create a pipeline (this includes on schedules, pushes, merges, etc.). - if: '$CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH' # For tags, create a pipeline. - if: '$CI_COMMIT_TAG' .test_template: &test_definition stage: test script: - gem install bundler - bundle install - bundle exec rake verify build install test:3.0: image: ruby:3.0 <<: *test_definition allow_failure: true # until we resolve grpc compatibility, see https://gitlab.com/gitlab-org/labkit-ruby/-/merge_requests/81 test:2.7: image: ruby:2.7 <<: *test_definition test:2.6: image: ruby:2.6 <<: *test_definition static-analysis: before_script: - bundle install script: - rake verify deploy: stage: deploy script: - tools/deploy-rubygem.sh only: - tags release: stage: deploy script: - tools/update-changelog.rb "${CI_COMMIT_TAG}" only: - tags