diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml new file mode 100644 index 00000000..56e2b7fb --- /dev/null +++ b/.github/workflows/unit_test.yml @@ -0,0 +1,39 @@ +name: Ruby Unit Tests + +on: + push: + branches: + - master + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + ruby: [ '2.5', '2.6', '2.7' ] + + name: Ruby ${{ matrix.ruby }} + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + - name: Cache gems + uses: actions/cache@v2 + env: + cache-name: cache-gems + with: + path: vendor/bundle + key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} + restore-keys: | + ${{ runner.os }}-gems- + - name: Set bundle config path + run: | + bundle config path vendor/bundle + - name: Install dependencies + run: | + bundle install + - name: Ruby Unit tests + run: | + bundle exec rspec diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index e167ee51..00000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -language: ruby -sudo: false -dist: trusty -cache: bundler -rvm: - - 2.2.7 - - 2.3.4 - - 2.4.1 - - jruby-head - - rbx-2 - - ruby-head -matrix: - allow_failures: - - rvm: jruby-head - - rvm: rbx-2 - - rvm: ruby-head -jdk: - - oraclejdk8 -before_install: - - gem install bundler - - gem update bundler diff --git a/video_info.gemspec b/video_info.gemspec index a7f59ad0..48d322ef 100644 --- a/video_info.gemspec +++ b/video_info.gemspec @@ -18,7 +18,7 @@ Gem::Specification.new do |s| s.test_files = s.files.grep(%r{^spec/}) s.require_path = 'lib' - s.required_ruby_version = '>= 2.2.0' + s.required_ruby_version = '>= 2.5.0' s.add_dependency 'iso8601', '~> 0.9.1' s.add_dependency 'oga', '~> 3.0'