From ae80170bcd036d96faa208d5822b6c7f749a5a58 Mon Sep 17 00:00:00 2001 From: Matt Brictson Date: Mon, 20 Feb 2023 14:12:03 -0800 Subject: 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 --- .github/workflows/ci.yml | 37 +++++++++++++++++++++++++++++++++++++ .travis.yml | 22 ---------------------- Gemfile | 10 ++++++++-- README.rdoc | 2 +- plist.gemspec | 4 ---- 5 files changed, 46 insertions(+), 29 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml 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 diff --git a/Gemfile b/Gemfile index 304caaa..4a77753 100644 --- a/Gemfile +++ b/Gemfile @@ -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 {Gem Version}[https://rubygems.org/gems/plist] -{Build Status}[https://travis-ci.org/patsplat/plist] +{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 -- cgit v1.2.1