diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 03e9039..88d2b1e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,34 +1,61 @@ -image: "ruby:2.4.5" - +--- cache: paths: - vendor/ruby - spec/fixtures variables: + +.puppet400: &puppet400 + PUPPET_LOCATION: 4.0.0 + BUNDLER: '1.7.3' + +.puppet41012: &puppet41012 PUPPET_LOCATION: 4.10.12 + BUNDLER: '1.7.3' -before_script: - - gem install bundler --no-document - - bundle install -j $(nproc) --path vendor +.puppet550: &puppet550 + PUPPET_LOCATION: 5.5.0 + BUNDLER: '>= 0' -test-syntax: - stage: test +.syntax: &syntax script: - bundle exec rake syntax -test-validate: - stage: test +.validate: &validate script: - bundle exec rake validate -test-lint: - stage: test +.lint: &lint script: - bundle exec rake lint -test-rspec: - stage: test +.spec: &spec script: - bundle exec rake spec SPEC_OPTS='--format documentation' coverage: '/Resource coverage: \d+\.\d+/' + +before_script: + - gem install bundler --no-document --version "$BUNDLER" + - bundle install -j $(nproc) --path vendor --without development acceptance + +puppet41012_test: + stage: test + image: "ruby:2.1.9" + <<: [*syntax, *validate, *lint, *spec] + variables: + <<: [*puppet41012] + +puppet550_test: + image: "ruby:2.4.5" + stage: test + <<: [*syntax, *validate, *lint, *spec] + variables: + <<: [*puppet550] + +puppet400_test: + stage: test + image: "ruby:2.1.9" + <<: [*syntax, *validate, *lint, *spec] + variables: + <<: [*puppet400] diff --git a/.travis.yml b/.travis.yml index 9fd46ac..08c06dc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,16 +22,21 @@ env: - PUPPET_LOCATION="~> 3.6.0" - PUPPET_LOCATION="~> 3.7.0" - PUPPET_LOCATION="~> 4.0.0" - - PUPPET_LOCATION="~> 5.5.0" matrix: include: - - rvm: 1.9.3 - env: PUPPET_LOCATION="~> 3.2.0" - rvm: 2.0.0 env: PUPPET_LOCATION="~> 3.3.0" + - rvm: 2.4.5 + env: PUPPET_LOCATION="~> 5.5.0" global: - - PUBLISHER_LOGIN=bjvrielink + - PUBLISHER_LOGIN=abrader notifications: email: false + webhooks: + urls: + - 'https://webhooks.gitter.im/e/16f24db0492933fce79d' + on_success: change + on_failure: always + on_start: false diff --git a/Gemfile b/Gemfile index 43ab7a2..6e0d856 100644 --- a/Gemfile +++ b/Gemfile @@ -12,7 +12,7 @@ end group :test do gem 'rake' - gem 'puppet', *location_for(ENV['PUPPET_LOCATION'] || '~> 5.5.0') + gem 'puppet', *location_for(ENV['PUPPET_LOCATION'] || '~> 3.7.0') gem 'puppetlabs_spec_helper' gem 'webmock' gem 'vcr'