Skip to content

Commit

Permalink
Several updates to CI testing
Browse files Browse the repository at this point in the history
  • Loading branch information
clintoncwolfe authored Feb 2, 2021
2 parents 7fe8968 + 959d45d commit de7758a
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 9 deletions.
7 changes: 2 additions & 5 deletions .expeditor/buildkite/verify.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,5 @@ bundle --version
echo "--- bundle install"
bundle install --jobs=7 --retry=3 --without tools maintenance deploy

echo "+++ bundle exec rake lint"
bundle exec rake lint

echo "+++ bundle exec rake test:check"
bundle exec rake test:check
echo "+++ bundle exec rake $RAKE_TASK"
bundle exec rake $RAKE_TASK
34 changes: 32 additions & 2 deletions .expeditor/verify.pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,48 @@
---
expeditor:
defaults:
buildkite:
timeout_in_minutes: 20


steps:

- label: lint-ruby-2.6
command:
- RAKE_TASK=lint /workdir/.expeditor/buildkite/verify.sh
expeditor:
executor:
docker:
image: ruby:2.6-stretch

- label: run-tests-ruby-2.5
command:
- /workdir/.expeditor/buildkite/verify.sh
- RAKE_TASK=default /workdir/.expeditor/buildkite/verify.sh
expeditor:
executor:
docker:
image: ruby:2.5-stretch

- label: run-tests-ruby-2.6
command:
- /workdir/.expeditor/buildkite/verify.sh
- RAKE_TASK=default /workdir/.expeditor/buildkite/verify.sh
expeditor:
executor:
docker:
image: ruby:2.6-stretch

- label: run-tests-ruby-2.7
command:
- RAKE_TASK=default /workdir/.expeditor/buildkite/verify.sh
expeditor:
executor:
docker:
image: ruby:2.7

- label: run-tests-ruby-3.0
command:
- RAKE_TASK=default /workdir/.expeditor/buildkite/verify.sh
expeditor:
executor:
docker:
image: ruby:3.0
5 changes: 5 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ gem 'inifile'
gem 'inspec-bin', '4.26.4'
gem 'rubocop', '>= 0.77.0'

if Gem.ruby_version.to_s.start_with?("2.5")
# 16.7.23 required ruby 2.6+
gem "chef-utils", "< 16.7.23" # TODO: remove when we drop ruby 2.5
end

group :development do
gem 'github_changelog_generator'
gem 'pry-coolline'
Expand Down
4 changes: 2 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ desc 'Run robocop linter'
task lint: [:rubocop]

# run tests
task default: [:lint, 'test:check']
task default: ['test:check']

namespace :test do
# Specify the directory for the integration tests
Expand All @@ -39,7 +39,7 @@ namespace :test do
# Disabling inspec check on profile with path dependency due to https://github.com/inspec/inspec/issues/3571
#sh("cd #{integration_dir}/verify && bundle exec inspec check .")
end


task :init_workspace do
# Initialize terraform workspace
Expand Down

0 comments on commit de7758a

Please sign in to comment.