diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..1702374 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,68 @@ +name: Test + +on: + pull_request: {} + push: + branches: master + +env: + BUNDLE_WITHOUT: development:release + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + ruby: + - "3.1" + - "3.0" + - "2.7" + - "2.6" + - "2.5" + - "2.4" + puppet: + - "~> 7.0" + - "~> 6.5" + - "~> 5.5.10" + - "https://github.com/puppetlabs/puppet.git#main" + exclude: + - ruby: "2.6" + puppet: "~> 7.0" + - ruby: "2.5" + puppet: "~> 7.0" + - ruby: "2.4" + puppet: "~> 7.0" + + - ruby: "3.1" + puppet: "~> 6.5" + - ruby: "3.0" + puppet: "~> 6.5" + + - ruby: "3.1" + puppet: "~> 5.5.10" + - ruby: "3.0" + puppet: "~> 5.5.10" + - ruby: "2.7" + puppet: "~> 5.5.10" + - ruby: "2.6" + puppet: "~> 5.5.10" + + - ruby: "2.6" + puppet: "https://github.com/puppetlabs/puppet.git#main" + - ruby: "2.5" + puppet: "https://github.com/puppetlabs/puppet.git#main" + - ruby: "2.4" + puppet: "https://github.com/puppetlabs/puppet.git#main" + name: "Ruby ${{ matrix.ruby }} - Puppet ${{ matrix.puppet }}" + env: + PUPPET_VERSION: ${{ matrix.puppet }} + steps: + - uses: actions/checkout@v3 + - name: Install Ruby ${{ matrix.ruby }} + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + - name: Run tests + run: bundle exec rake diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ed78138..0000000 --- a/.travis.yml +++ /dev/null @@ -1,43 +0,0 @@ ---- -os: linux -dist: bionic -language: ruby -# Workaround https://github.com/bundler/bundler/issues/3558 -before_install: gem install bundler -install: bundle install --jobs 4 --retry 2 --without development release -script: bundle exec rake -rvm: - - 2.4.4 - - 2.5.1 - - 2.6.5 - - 2.7 -env: - - PUPPET_VERSION="~> 5.5.10" - - PUPPET_VERSION="~> 6.5" - - PUPPET_VERSION=">= 0" - - PUPPET_VERSION="git://github.com/puppetlabs/puppet.git#master" -jobs: - exclude: - - rvm: 2.7 - env: PUPPET_VERSION="~> 5.5.10" - allow_failures: - - env: PUPPET_VERSION=">= 0" - - env: PUPPET_VERSION="git://github.com/puppetlabs/puppet.git#master" -deploy: - provider: rubygems - api_key: - secure: "kwxryZZ/t9EkWuYxhz3G1v+U3ZK4WdsiN0UFHDjijnAGPxqe/n+oBcNA8hOiNhjZeTFo8bADEZkL7JtdKQo9RvgStipyaS5gDHB/C1c4LOBWv4Tga21NNCAuBcE2CDtAH3+TzrZV5vv2+SpOrhKZpzZoAoR6PR1MWVWMUie/rE0=" - gem: puppet-syntax - on: - rvm: 2.5.1 - condition: '"$PUPPET_VERSION" = "~> 5.5.10"' - tags: true - all_branches: true - repo: voxpupuli/puppet-syntax -notifications: - email: false - irc: - on_success: always - on_failure: always - channels: - - "chat.freenode.org#voxpupuli-notifications" diff --git a/Gemfile b/Gemfile index 2128d7b..991cb2c 100644 --- a/Gemfile +++ b/Gemfile @@ -19,12 +19,12 @@ gemspec # Override gemspec for CI matrix builds. # But only if the environment variable is set -gem 'puppet', *location_for(ENV['PUPPET_VERSION'] || '>= 5') if ENV['PUPPET_VERSION'] +gem 'puppet', *location_for(ENV['PUPPET_VERSION']) if ENV['PUPPET_VERSION'] group :test do gem 'rspec' end group :release do - gem 'github_changelog_generator', :require => false, :git => 'https://github.com/github-changelog-generator/github-changelog-generator' + gem 'github_changelog_generator', require: false end diff --git a/README.md b/README.md index e2baeec..3096ddc 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://travis-ci.org/voxpupuli/puppet-syntax.svg?branch=master)](https://travis-ci.org/voxpupuli/puppet-syntax) +TODO: [![Build Status](https://travis-ci.org/voxpupuli/puppet-syntax.svg?branch=master)](https://travis-ci.org/voxpupuli/puppet-syntax) [![Gem Version](https://img.shields.io/gem/v/puppet-syntax.svg)](https://rubygems.org/gems/puppet-syntax) [![Gem Downloads](https://img.shields.io/gem/dt/puppet-syntax.svg)](https://rubygems.org/gems/puppet-syntax) @@ -14,7 +14,7 @@ Puppet::Syntax is supported with: - Puppet >= 5.0 that provides the `validate` face. - Ruby >= 2.4 -For the specific versions that we test against, see the [TravisCI config](.travis.yml). +For the specific versions that we test against, see the [GitHub Actions workflow](.github/workflows/test.yml). ## Installation