diff options
author | Matt Brictson <matt@mattbrictson.com> | 2023-02-20 14:12:03 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-20 14:12:03 -0800 |
commit | ae80170bcd036d96faa208d5822b6c7f749a5a58 (patch) | |
tree | 00d4b2bcbb7d0089aa44522d29b8f0adcd54aaf6 | |
parent | ce8f9ae42a114f603ea200c955e420782bffc4ad (diff) | |
download | plist-ae80170bcd036d96faa208d5822b6c7f749a5a58.tar.gz |
Migrate from Travis CI to GitHub Actions (#59)
* Migrate from Travis CI to GitHub Actions
* Move dev dependencies to Gemfile and fix rake incompat with Ruby 3.2+
* Override rubygems only for Ruby 1.9
-rw-r--r-- | .github/workflows/ci.yml | 37 | ||||
-rw-r--r-- | .travis.yml | 22 | ||||
-rw-r--r-- | Gemfile | 10 | ||||
-rw-r--r-- | README.rdoc | 2 | ||||
-rw-r--r-- | plist.gemspec | 4 |
5 files changed, 46 insertions, 29 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..92eb893 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +name: test on CI +on: + push: + branches: [master] + pull_request: +jobs: + test: + runs-on: ubuntu-latest + strategy: + matrix: + ruby: + [ + "1.9", + "2.0", + "2.1", + "2.2", + "2.3", + "2.4", + "2.5", + "2.6", + "2.7", + "3.0", + "3.1", + "3.2", + "head", + "jruby-head", + ] + steps: + - uses: actions/checkout@v3 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + rubygems: ${{ matrix.ruby == '1.9' && '2.7.11' || 'default' }} + bundler-cache: true + - name: Run tests + run: bundle exec rake test diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 50ba6fd..0000000 --- a/.travis.yml +++ /dev/null @@ -1,22 +0,0 @@ ---- -language: ruby -cache: bundler -branches: - only: - - master -rvm: - - jruby-18mode - - jruby-19mode - - 1.9.3 - - 2.0.0-p648 # macOS - - 2.1.10 - - 2.2.10 - - 2.3.8 - - 2.4.5 - - 2.5.3 - - 2.6 - - 2.7 - - 3.0 - - ruby-head - - jruby-head -before_install: gem install bundler -v '~> 1.14' --conservative @@ -1,4 +1,10 @@ source "https://rubygems.org" - -# Specify your gem's dependencies in plist.gemspec gemspec + +if Gem::Requirement.new("< 2.2").satisfied_by?(Gem::Version.new(RUBY_VERSION)) + gem "rake", "~> 11.3" +else + gem "rake", "~> 13.0" +end + +gem "test-unit", "~> 3.5" diff --git a/README.rdoc b/README.rdoc index e7dcd33..697d70c 100644 --- a/README.rdoc +++ b/README.rdoc @@ -1,7 +1,7 @@ = All-purpose Property List manipulation library {<img src="https://badge.fury.io/rb/plist.svg" alt="Gem Version" />}[https://rubygems.org/gems/plist] -{<img src="https://travis-ci.org/patsplat/plist.svg?branch=master" alt="Build Status" />}[https://travis-ci.org/patsplat/plist] +{<img src="https://github.com/patsplat/plist/actions/workflows/ci.yml/badge.svg" alt="Build Status" />}[https://github.com/patsplat/plist/actions/workflows/ci.yml] Plist is a library to manipulate Property List files, also known as plists. It can parse plist files into native Ruby data structures as well as generating new plist files from your Ruby objects. diff --git a/plist.gemspec b/plist.gemspec index 527c47f..4355726 100644 --- a/plist.gemspec +++ b/plist.gemspec @@ -21,8 +21,4 @@ Gem::Specification.new do |spec| spec.require_paths = ["lib"] spec.required_ruby_version = ">= 1.9.3" - - spec.add_development_dependency "bundler", ">= 1.14" - spec.add_development_dependency "rake", "~> 10.5" - spec.add_development_dependency "test-unit", "~> 1.2" end |