dist: xenial
sudo: false
language: ruby
cache: bundler
bundler_args: "--without acceptance_testing metatools"
env:
- PUPPET_GEM_VERSION='~> 6.0'
- PUPPET_GEM_VERSION='~> 5.0'
rvm:
- 2.4.6
- 2.5.5
- 2.6.3
before_install:
- gem install bundler
script: bundle exec rake travis:ci
jobs:
  include:
  - stage: Report test coverage to code climate
    if: branch = master
    rvm: 2.6.3
    before_script:
    - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64
      > ./cc-test-reporter
    - chmod +x ./cc-test-reporter
    - "./cc-test-reporter before-build"
    script:
    - bundle exec rake spec
    after_script:
    - "./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT"
  - stage: Release on Puppet Forge
    if: branch = release
    rvm: 2.6.3
    script: bundle exec rake forge:release
  - stage: Release on GitHub
    if: branch = release
    rvm: 2.6.3
    script: bundle exec rake github:release
  - stage: Update GitHub Pages
    if: branch = release
    rvm: 2.6.3
    script: bundle exec rake github:pages

dist: xenial
sudo: false
language: ruby
cache: bundler
bundler_args: "--without acceptance_testing metatools"
env:
- PUPPET_GEM_VERSION='~> 6.0'
- PUPPET_GEM_VERSION='~> 5.0'
rvm:
- 2.4.10
- 2.5.8
- 2.6.6
before_install:
- gem install bundler
script: bundle exec rake travis:ci
jobs:
  include:
  - stage: Report test coverage to code climate
    if: branch = master
    rvm: 2.6.3
    before_script:
    - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64
      > ./cc-test-reporter
    - chmod +x ./cc-test-reporter
    - "./cc-test-reporter before-build"
    script:
    - bundle exec rake spec
    after_script:
    - "./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT"
  - stage: Release on Puppet Forge
    if: branch = release
    rvm: 2.6.3
    script: bundle exec rake forge:release
  - stage: Release on GitHub
    if: branch = release
    rvm: 2.6.3
    script: bundle exec rake github:release
  - stage: Update GitHub Pages
    if: branch = release
    rvm: 2.6.3
    script: bundle exec rake github:pages

Update Ruby versions in test
Update Ruby versions in test
