diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..333c6dc --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,50 @@ +name: Test + +on: [push, pull_request] + +permissions: + contents: read + +env: + CONSOLE_OUTPUT: XTerm + +jobs: + test: + name: ${{matrix.ruby}} on ${{matrix.os}} + runs-on: ${{matrix.os}}-latest + continue-on-error: ${{matrix.experimental}} + + strategy: + matrix: + os: + - ubuntu + - macos + + ruby: + - "3.1" + - "3.2" + - "3.3" + + experimental: [false] + + include: + - os: ubuntu + ruby: truffleruby + experimental: true + - os: ubuntu + ruby: jruby + experimental: true + - os: ubuntu + ruby: head + experimental: true + + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{matrix.ruby}} + bundler-cache: true + + - name: Run tests + timeout-minutes: 10 + run: bundle exec rspec diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c9a812d..0000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ -language: ruby -cache: bundler - -matrix: - include: - - rvm: 2.3 - - rvm: 2.4 - - rvm: 2.5 - - rvm: 2.6 - - rvm: 2.7 - - rvm: jruby - - rvm: truffleruby - - rvm: jruby-head - - rvm: ruby-head - allow_failures: - - rvm: truffleruby - - rvm: jruby - - rvm: ruby-head - - rvm: jruby-head - fast_finish: true diff --git a/Gemfile b/Gemfile index 9b2ce27..f0544e5 100644 --- a/Gemfile +++ b/Gemfile @@ -3,14 +3,18 @@ source 'https://rubygems.org' # Specify your gem's dependencies in utopia.gemspec gemspec -group :development do - gem 'pry' - gem 'pry-coolline' - - gem 'tty-prompt' +group :maintenance, optional: true do + gem "bake-gem" + gem "bake-modernize" end group :test do - gem 'simplecov' - gem 'coveralls', require: false + gem "rspec", "~> 3.6" + + gem 'simplecov' + gem 'coveralls', require: false + + gem "bundler" + gem "rake" + gem "concurrent-ruby" end diff --git a/Rakefile b/Rakefile deleted file mode 100644 index bc3a3b6..0000000 --- a/Rakefile +++ /dev/null @@ -1,14 +0,0 @@ -require "bundler/gem_tasks" -require 'rspec/core/rake_task' - -RSpec::Core::RakeTask.new(:spec) - -desc "Run tests" -task :default => :spec - -task :console do - require 'rb-inotify' - require 'pry' - - binding.pry -end diff --git a/rb-inotify.gemspec b/rb-inotify.gemspec index e83eafe..253bf8c 100644 --- a/rb-inotify.gemspec +++ b/rb-inotify.gemspec @@ -20,9 +20,4 @@ Gem::Specification.new do |spec| spec.required_ruby_version = '>= 2.2' spec.add_dependency "ffi", "~> 1.0" - - spec.add_development_dependency "rspec", "~> 3.6" - spec.add_development_dependency "bundler" - spec.add_development_dependency "rake" - spec.add_development_dependency "concurrent-ruby" end