diff --git a/.github/workflows/ci-build-and-install-gem.yml b/.github/workflows/ci-build-and-install-gem.yml new file mode 100644 index 0000000..eab5d75 --- /dev/null +++ b/.github/workflows/ci-build-and-install-gem.yml @@ -0,0 +1,21 @@ +name: CI build and install gem + +on: + push: + pull_request: + +jobs: + build: + runs-on: ubuntu-18.04 + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: 2.7.2 + + - name: Build and install gem + run: gem build *.gemspec && gem install *.gem diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..d47b5f2 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,34 @@ +name: CI + +on: + push: + pull_request: + +jobs: + build: + runs-on: ubuntu-18.04 + + strategy: + fail-fast: false + matrix: + include: + - { ruby: 2.5.8 } + - { ruby: 2.6.6 } + - { ruby: 2.7.2 } + - { ruby: head, allow-failure: true } + - { ruby: jruby-9.2.13.0 } + - { ruby: jruby-head, allow-failure: true } + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Setup Ruby ${{ matrix.ruby }} + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + + - name: Run tests + run: bundle exec rake + continue-on-error: ${{ matrix.allow-failure || false }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 4ebf201..0000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: ruby -matrix: - include: - - rvm: jruby-9.2.11.1 - - rvm: 2.5.8 - - rvm: 2.6.6 - - rvm: jruby-head - - rvm: ruby-head - - rvm: 2.7.2 - - rvm: 2.7.2 - install: true # This skips 'bundle install' - script: gem build *.gemspec && gem install *.gem - allow_failures: - - rvm: jruby-head - - rvm: ruby-head - fast_finish: true -before_install: - - gem install bundler -cache: bundler -notifications: - email: false diff --git a/README.md b/README.md index bb9b875..8c41c85 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Twingly::URL -[![Build Status](https://travis-ci.org/twingly/twingly-url.svg?branch=master)](https://travis-ci.org/twingly/twingly-url) +[![GitHub Build Status](https://github.com/twingly/twingly-url/workflows/CI/badge.svg)](https://github.com/twingly/twingly-url/actions) Twingly URL tools. diff --git a/twingly-url.gemspec b/twingly-url.gemspec index a1bbf28..9e7c980 100644 --- a/twingly-url.gemspec +++ b/twingly-url.gemspec @@ -12,7 +12,7 @@ Gem::Specification.new do |s| s.summary = "Ruby library for URL handling" s.description = "Twingly URL tools" s.license = "MIT" - s.required_ruby_version = "~> 2.5" + s.required_ruby_version = ">= 2.5" s.add_dependency "addressable", "~> 2.6" s.add_dependency "public_suffix", ">= 3.0.1", "< 5.0"