From af0eb73bbaa2965d973139198ee82b65746ede37 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 | 47 ++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 44 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index f97fbd1..4da347d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,47 @@ +--- +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 -x + # 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(".")') + + # install requested packages + gem install -N pkg/puppet-module-posix-default-r${MINOR_VERSION}*gem + gem install -N pkg/puppet-module-posix-${SET}-r${MINOR_VERSION}*gem + + set +x + +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