From 156aba6209ad831305fb20ad729f11a61d146a3a Mon Sep 17 00:00:00 2001 From: Austin Ziegler Date: Sat, 21 Nov 2020 14:22:22 -0500 Subject: [PATCH] Remove Travis, use GitHub Actions --- .coveralls.yml | 2 -- .github/workflows/ci.yml | 68 ++++++++++++++++++++++++++++++++++++++++ .hoerc | 1 + .travis.yml | 29 ----------------- Rakefile | 27 +--------------- mime-types.gemspec | 11 +------ test/minitest_helper.rb | 2 -- 7 files changed, 71 insertions(+), 69 deletions(-) delete mode 100644 .coveralls.yml create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml diff --git a/.coveralls.yml b/.coveralls.yml deleted file mode 100644 index 0eed048..0000000 --- a/.coveralls.yml +++ /dev/null @@ -1,2 +0,0 @@ ---- -service_name: travis-ci diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..7c83bf6 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,68 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake +# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby + +name: CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + test: + strategy: + matrix: + os: + - ubuntu + - macos + - windows + ruby: + - 2.4 + - 2.5 + - 2.6 + - 2.7 + - head + - debug + - mingw + - mswin + - jruby + - jruby-head + - truffleruby + - truffleruby-head + exclude: + - os: macos + ruby: mingw + - os: macos + ruby: mswin + - os: ubuntu + ruby: mingw + - os: ubuntu + ruby: mswin + - os: windows + ruby: debug + - os: windows + ruby: truffleruby + - os: windows + ruby: truffleruby-head + runs-on: ${{ matrix.os }}-latest + continue-on-error: ${{ + endsWith(matrix.ruby, 'head') || + matrix.ruby == 'debug' || + (startsWith(matrix.ruby, 'jruby') && matrix.os == 'windows') + }} + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + - name: Install dependencies + run: bundle install + - name: Run tests + run: bundle exec ruby -S rake test --trace diff --git a/.hoerc b/.hoerc index c9a065d..6dec75a 100644 --- a/.hoerc +++ b/.hoerc @@ -8,6 +8,7 @@ exclude: !ruby/regexp '/ \.(?: bundle| git| + github| hg| idea| svn| diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 19ec5f6..0000000 --- a/.travis.yml +++ /dev/null @@ -1,29 +0,0 @@ ---- -language: ruby -rvm: - - 2.7.0 - - 2.6.5 - - 2.5.7 - - 2.4.9 - - 2.3.8 - - 2.2.10 - - jruby-9.2.9.0 - - jruby-9.1.17.0 - - jruby-head - - ruby-head - - truffleruby-head - - truffleruby -matrix: - allow_failures: - - rvm: jruby-head - - rvm: ruby-head - - rvm: truffleruby-head - - rvm: truffleruby - fast_finish: true -gemfile: - - Gemfile -before_script: - - rake travis:before -t -script: rake travis -after_script: - - rake travis:after -t diff --git a/Rakefile b/Rakefile index fa6d838..65a9df3 100644 --- a/Rakefile +++ b/Rakefile @@ -8,8 +8,7 @@ Hoe.plugin :doofus Hoe.plugin :gemspec2 Hoe.plugin :git Hoe.plugin :minitest -Hoe.plugin :travis -Hoe.plugin :email unless ENV['CI'] or ENV['TRAVIS'] +Hoe.plugin :email unless ENV['CI'] spec = Hoe.spec 'mime-types' do developer('Austin Ziegler', 'halostatue@gmail.com') @@ -28,21 +27,15 @@ spec = Hoe.spec 'mime-types' do extra_dev_deps << ['hoe-gemspec2', '~> 1.1'] extra_dev_deps << ['hoe-git', '~> 1.6'] extra_dev_deps << ['hoe-rubygems', '~> 1.0'] - extra_dev_deps << ['hoe-travis', '~> 1.2'] extra_dev_deps << ['minitest', '~> 5.4'] extra_dev_deps << ['minitest-autotest', '~> 1.0'] extra_dev_deps << ['minitest-focus', '~> 1.0'] extra_dev_deps << ['minitest-bonus-assertions', '~> 3.0'] extra_dev_deps << ['minitest-hooks', '~> 1.4'] extra_dev_deps << ['rake', '>= 10.0', '< 14.0'] - extra_dev_deps << ['fivemat', '~> 1.3'] - extra_dev_deps << ['minitest-rg', '~> 5.2'] if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.0') extra_dev_deps << ['simplecov', '~> 0.7'] - # if ENV['CI'] or ENV['TRAVIS'] - # extra_dev_deps << ['coveralls', '~> 0.8'] - # end end end @@ -180,24 +173,6 @@ end if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('2.0') namespace :test do - # Coveralls needs to be disabled for now because it transitively depends on - # an earlier version of mime-types. - # if ENV['CI'] or ENV['TRAVIS'] - # task :coveralls do - # spec.test_prelude = [ - # 'require "psych"', - # 'require "simplecov"', - # 'require "coveralls"', - # 'SimpleCov.formatter = Coveralls::SimpleCov::Formatter', - # 'SimpleCov.start("test_frameworks") { command_name "Minitest" }', - # 'gem "minitest"' - # ].join('; ') - # Rake::Task['test'].execute - # end - - # Rake::Task['travis'].prerequisites.replace(%w(test:coveralls)) - # end - desc 'Run test coverage' task :coverage do spec.test_prelude = [ diff --git a/mime-types.gemspec b/mime-types.gemspec index 48d8db1..3a2a61f 100644 --- a/mime-types.gemspec +++ b/mime-types.gemspec @@ -9,7 +9,7 @@ Gem::Specification.new do |s| s.metadata = { "bug_tracker_uri" => "https://github.com/mime-types/ruby-mime-types/issues", "changelog_uri" => "https://github.com/mime-types/ruby-mime-types/blob/master/History.md", "homepage_uri" => "https://github.com/mime-types/ruby-mime-types/", "source_code_uri" => "https://github.com/mime-types/ruby-mime-types/" } if s.respond_to? :metadata= s.require_paths = ["lib".freeze] s.authors = ["Austin Ziegler".freeze] - s.date = "2019-12-26" + s.date = "2020-11-21" s.description = "The mime-types library provides a library and registry for information about\nMIME content type definitions. It can be used to determine defined filename\nextensions for MIME types, or to use filename extensions to look up the likely\nMIME type definitions.\n\nVersion 3.0 is a major release that requires Ruby 2.0 compatibility and removes\ndeprecated functions. The columnar registry format introduced in 2.6 has been\nmade the primary format; the registry data has been extracted from this library\nand put into {mime-types-data}[https://github.com/mime-types/mime-types-data].\nAdditionally, mime-types is now licensed exclusively under the MIT licence and\nthere is a code of conduct in effect. There are a number of other smaller\nchanges described in the History file.".freeze s.email = ["halostatue@gmail.com".freeze] s.extra_rdoc_files = ["Code-of-Conduct.md".freeze, "Contributing.md".freeze, "History.md".freeze, "Licence.md".freeze, "Manifest.txt".freeze, "README.rdoc".freeze] @@ -31,14 +31,11 @@ Gem::Specification.new do |s| s.add_development_dependency(%q.freeze, ["~> 1.1"]) s.add_development_dependency(%q.freeze, ["~> 1.6"]) s.add_development_dependency(%q.freeze, ["~> 1.0"]) - s.add_development_dependency(%q.freeze, ["~> 1.2"]) s.add_development_dependency(%q.freeze, ["~> 1.0"]) s.add_development_dependency(%q.freeze, ["~> 1.0"]) s.add_development_dependency(%q.freeze, ["~> 3.0"]) s.add_development_dependency(%q.freeze, ["~> 1.4"]) s.add_development_dependency(%q.freeze, [">= 10.0", "< 14.0"]) - s.add_development_dependency(%q.freeze, ["~> 1.3"]) - s.add_development_dependency(%q.freeze, ["~> 5.2"]) s.add_development_dependency(%q.freeze, ["~> 0.7"]) s.add_development_dependency(%q.freeze, [">= 4.0", "< 7"]) s.add_development_dependency(%q.freeze, ["~> 3.20"]) @@ -49,14 +46,11 @@ Gem::Specification.new do |s| s.add_dependency(%q.freeze, ["~> 1.1"]) s.add_dependency(%q.freeze, ["~> 1.6"]) s.add_dependency(%q.freeze, ["~> 1.0"]) - s.add_dependency(%q.freeze, ["~> 1.2"]) s.add_dependency(%q.freeze, ["~> 1.0"]) s.add_dependency(%q.freeze, ["~> 1.0"]) s.add_dependency(%q.freeze, ["~> 3.0"]) s.add_dependency(%q.freeze, ["~> 1.4"]) s.add_dependency(%q.freeze, [">= 10.0", "< 14.0"]) - s.add_dependency(%q.freeze, ["~> 1.3"]) - s.add_dependency(%q.freeze, ["~> 5.2"]) s.add_dependency(%q.freeze, ["~> 0.7"]) s.add_dependency(%q.freeze, [">= 4.0", "< 7"]) s.add_dependency(%q.freeze, ["~> 3.20"]) @@ -68,14 +62,11 @@ Gem::Specification.new do |s| s.add_dependency(%q.freeze, ["~> 1.1"]) s.add_dependency(%q.freeze, ["~> 1.6"]) s.add_dependency(%q.freeze, ["~> 1.0"]) - s.add_dependency(%q.freeze, ["~> 1.2"]) s.add_dependency(%q.freeze, ["~> 1.0"]) s.add_dependency(%q.freeze, ["~> 1.0"]) s.add_dependency(%q.freeze, ["~> 3.0"]) s.add_dependency(%q.freeze, ["~> 1.4"]) s.add_dependency(%q.freeze, [">= 10.0", "< 14.0"]) - s.add_dependency(%q.freeze, ["~> 1.3"]) - s.add_dependency(%q.freeze, ["~> 5.2"]) s.add_dependency(%q.freeze, ["~> 0.7"]) s.add_dependency(%q.freeze, [">= 4.0", "< 7"]) s.add_dependency(%q.freeze, ["~> 3.20"]) diff --git a/test/minitest_helper.rb b/test/minitest_helper.rb index 27c3913..f91ed8e 100644 --- a/test/minitest_helper.rb +++ b/test/minitest_helper.rb @@ -4,9 +4,7 @@ require 'fileutils' gem 'minitest' -require 'fivemat/minitest/autorun' require 'minitest/focus' -require 'minitest/rg' require 'minitest-bonus-assertions' require 'minitest/hooks'