From aedcfe32980a86f2fc00dea70f85ed2e9cb40bb8 Mon Sep 17 00:00:00 2001 From: Matthew Hutchinson Date: Fri, 20 Sep 2024 22:26:04 +0100 Subject: [PATCH] prep for new version, use GH actions, ditch Travis & coverage --- .github/workflows/build.yml | 27 +++++++++++++++++++++++++++ .github/workflows/push_gem.yml | 25 +++++++++++++++++++++++++ CHANGELOG.md | 4 ++++ README.md | 13 ++++--------- Rakefile | 12 +----------- lib/lolcommits/loltext/version.rb | 2 +- lolcommits-loltext.gemspec | 5 ++--- test/test_helper.rb | 4 ---- 8 files changed, 64 insertions(+), 28 deletions(-) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/push_gem.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..9d7fe69 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,27 @@ +name: Tests + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + ruby-version: ['3.1', '3.2', '3.3', '3.4'] + steps: + - uses: actions/checkout@v4 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true + - name: Run tests + run: bundle exec rake test diff --git a/.github/workflows/push_gem.yml b/.github/workflows/push_gem.yml new file mode 100644 index 0000000..d974f13 --- /dev/null +++ b/.github/workflows/push_gem.yml @@ -0,0 +1,25 @@ +name: Publish gem to RubyGems.org + +on: + push: + tags: + - v* + +jobs: + push: + name: Push gem to RubyGems.org + runs-on: ubuntu-latest + + permissions: + id-token: write + contents: write + + steps: + - uses: actions/checkout@v4 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + bundler-cache: true + ruby-version: ruby + + - uses: rubygems/release-gem@v1 diff --git a/CHANGELOG.md b/CHANGELOG.md index 42b19f8..16ef321 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,10 @@ project adheres to [Semantic Versioning][Semver]. - Your contribution here! +## [0.5.0] - 2024-09-20 +### Removed +- Support for Ruby < 3.1 (older rubies no longer supported) + ## [0.4.0] - 2020-01-24 ### Removed - Support for Ruby < 2.4 (older rubies no longer supported) diff --git a/README.md b/README.md index d03e90d..cbab911 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,8 @@ # Lolcommits Loltext +[![Build](https://img.shields.io/github/actions/workflow/status/lolcommits/lolcommits-loltext/build.yml?branch=main&style=flat)](https://github.com/lolcommits/lolcommits-loltext/actions/workflows/build.yml) [![Gem](https://img.shields.io/gem/v/lolcommits-loltext.svg?style=flat)](http://rubygems.org/gems/lolcommits-loltext) -[![Travis](https://img.shields.io/travis/com/lolcommits/lolcommits-loltext/master.svg?style=flat)](https://travis-ci.com/lolcommits/lolcommits-loltext) [![Depfu](https://img.shields.io/depfu/lolcommits/lolcommits-loltext.svg?style=flat)](https://depfu.com/github/lolcommits/lolcommits-loltext) -[![Maintainability](https://api.codeclimate.com/v1/badges/2e0fa03867952572c5db/maintainability)](https://codeclimate.com/github/lolcommits/lolcommits-loltext/maintainability) -[![Test Coverage](https://api.codeclimate.com/v1/badges/2e0fa03867952572c5db/test_coverage)](https://codeclimate.com/github/lolcommits/lolcommits-loltext/test_coverage) [lolcommits](https://lolcommits.github.io/) takes a snapshot with your webcam every time you git commit code, and archives a lolcat style image @@ -30,7 +28,7 @@ more information on the options available. ## Requirements -* Ruby >= 2.4 +* Ruby >= 3.1 * A webcam * [ImageMagick](http://www.imagemagick.org) * [ffmpeg](https://www.ffmpeg.org) (optional) for animated gif capturing @@ -143,8 +141,7 @@ requests](https://github.com/lolcommits/lolcommits-loltext/pulls) are welcome on GitHub. When submitting pull requests, remember to add tests covering any new -behaviour, and ensure all tests are passing on [Travis -CI](https://travis-ci.com/lolcommits/lolcommits-loltext). Read the +behaviour, and ensure all tests are passing. Read the [contributing guidelines](https://github.com/lolcommits/lolcommits-loltext/blob/master/CONTRIBUTING.md) for more details. @@ -163,9 +160,7 @@ The gem is available as open source under the terms of ## Links -* [Travis CI](https://travis-ci.com/lolcommits/lolcommits-loltext) -* [Test Coverage](https://codeclimate.com/github/lolcommits/lolcommits-loltext/test_coverage) -* [Code Climate](https://codeclimate.com/github/lolcommits/lolcommits-loltext) +* [CI](https://img.shields.io/github/actions/workflow/status/lolcommits/lolcommits-loltext/build.yml?branch=main&style=flat)](https://github.com/lolcommits/lolcommits-loltext/actions/workflows/build.yml) * [RDoc](http://rdoc.info/projects/lolcommits/lolcommits-loltext) * [Issues](http://github.com/lolcommits/lolcommits-loltext/issues) * [Report a bug](http://github.com/lolcommits/lolcommits-loltext/issues/new) diff --git a/Rakefile b/Rakefile index 284c266..620bfa7 100644 --- a/Rakefile +++ b/Rakefile @@ -18,14 +18,4 @@ Rake::TestTask.new(:test) do |t| t.test_files = FileList["test/**/*_test.rb"] end -# run tests with code coverage (default) -namespace :test do - desc "Run all tests and features and generate a code coverage report" - task :coverage do - ENV['COVERAGE'] = 'true' - Rake::Task['test'].execute - end -end - - -task :default => ['test:coverage'] +task :default => ['test'] diff --git a/lib/lolcommits/loltext/version.rb b/lib/lolcommits/loltext/version.rb index 54b45ad..57255ea 100644 --- a/lib/lolcommits/loltext/version.rb +++ b/lib/lolcommits/loltext/version.rb @@ -2,6 +2,6 @@ module Lolcommits module Loltext - VERSION = "0.4.0".freeze + VERSION = "0.5.0".freeze end end diff --git a/lolcommits-loltext.gemspec b/lolcommits-loltext.gemspec index f34db99..e96344e 100644 --- a/lolcommits-loltext.gemspec +++ b/lolcommits-loltext.gemspec @@ -30,11 +30,10 @@ Gem::Specification.new do |spec| spec.executables = [] spec.require_paths = ["lib"] - spec.required_ruby_version = ">= 2.4" + spec.required_ruby_version = ">= 3.1" - spec.add_development_dependency "lolcommits", ">= 0.14.2" + spec.add_development_dependency "lolcommits", ">= 0.17.0" spec.add_development_dependency "bundler" spec.add_development_dependency "rake" spec.add_development_dependency "minitest" - spec.add_development_dependency "simplecov" end diff --git a/test/test_helper.rb b/test/test_helper.rb index a214aee..3a7cbda 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -9,10 +9,6 @@ require 'lolcommits/test_helpers/git_repo' require 'lolcommits/test_helpers/fake_io' -if ENV['COVERAGE'] - require 'simplecov' -end - # plugin gem test libs require 'lolcommits/loltext' require 'minitest/autorun'