image: ruby:2.7 definitions: steps: - step: &rubocop name: Rubocop runs-on: self.hosted script: - gem install rubocop rubocop-rspec rubocop-performance rubocop-sequel rubocop-md rubocop-sequel --no-document - rubocop --format junit --out test-reports/junit.xml - step: &rspec name: RSpec 2.7 runs-on: self.hosted caches: - bundler script: - gem install bundler rspec rspec_junit_formatter - bundle install - bundle exec rspec --format RspecJunitFormatter --out test-reports/junit.xml caches: bundler: /usr/local/bundle pipelines: default: - step: *rubocop - step: *rspec - parallel: - step: <<: *rspec name: RSpec 2.5 image: ruby:2.5 - step: <<: *rspec name: RSpec 2.6 image: ruby:2.6 - step: <<: *rspec name: RSpec 3 image: ruby:3 pull-requests: master: - step: *rubocop - step: *rspec - parallel: - step: <<: *rspec name: RSpec 2.5 image: ruby:2.5 - step: <<: *rspec name: RSpec 2.6 image: ruby:2.6 - step: <<: *rspec name: RSpec 3 image: ruby:3 - step: name: RubyGems Deployment deployment: RubyGems runs-on: self.hosted script: - gem install gem-release - (umask 077 ; echo $gem_creds | base64 --decode > ~/.gem/credentials) - gem release --tag --push - git push --tags - gem build # condition: # changesets: # includePaths: # - "lib/legion/**/version.rb" artifacts: - pkg/** - '*.gem'