From 9cd06ed5659a21027e24e046d6b6c25545246234 Mon Sep 17 00:00:00 2001 From: David Schmitt Date: Wed, 17 Jun 2020 10:47:49 +0100 Subject: [PATCH] Update travis to test building and installing on all rubies --- .travis.yml | 46 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index f97fbd1..3043814 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,46 @@ +--- +os: linux language: ruby -script: "bundle exec rspec spec" +cache: bundler + +stages: + - smoke + - test + +rvm: + - 2.7 + - 2.5 + - 2.4 + - 2.3 + - 2.2 + - 2.1 + +env: + - SET=dev + - SET=system + +script: | + # test installing the gems from $SET on this ruby version + set -e + + echo create gems + bundle exec ./exe/build-gems.rb + + # as used in Gemfiles from pdk-templates + MINOR_VERSION=$(ruby -e 'puts Gem::Version.new(RUBY_VERSION.dup).segments[0..1].join(".")') + + echo install requested packages for $MINOR_VERSION + gem install -N pkg/puppet-module-posix-default-r${MINOR_VERSION}*gem + gem install -N pkg/puppet-module-posix-${SET}-r${MINOR_VERSION}*gem + +jobs: + include: + - stage: smoke + name: "Make sure that gems build" + script: bundle exec ./exe/build-gems.rb + - stage: smoke + name: "Unit Tests" + script: bundle exec rspec spec + notifications: email: false -rvm: - - 2.3.1