Skip to content

Commit

Permalink
Move ci pipeline to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
xijo committed Oct 29, 2024
1 parent 6a71bc0 commit 45f35da
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 22 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI

on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: [ '2.7', '3.0', '3.1', '3.2', '3.3', 'jruby-9.4' ]

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true

- name: Install dependencies
run: bundle install

- name: Run tests
run: bundle exec rspec
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ruby 3.3.5
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Change Log
All notable changes to this project will be documented in this file.

## 3.0.0 - October 2024
- BREAKING: Dropped support for ruby 2.6.0 and lower

## 2.1.1 - October 2021
- Fixes unintentional newline characters within lists with paragraphs, thanks @diogoosorio, see #93
- Lets \n to be present in <pre> tag. solves #77 #78, thanks @shivabhusal
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ See [Change Log](CHANGELOG.md)
## Requirements

1. [Nokogiri](http://nokogiri.org/)
2. Ruby 2.0.0 or higher
2. Ruby 2.7.0 or higher

## Installation

Expand Down
2 changes: 1 addition & 1 deletion reverse_markdown.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ Gem::Specification.new do |s|
s.add_development_dependency 'simplecov'
s.add_development_dependency 'rake'
s.add_development_dependency 'kramdown'
s.add_development_dependency 'debug'
s.add_development_dependency 'debug' unless RUBY_ENGINE == 'jruby'
s.add_development_dependency 'codeclimate-test-reporter'
end
3 changes: 2 additions & 1 deletion spec/lib/reverse_markdown_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@

describe 'force_encoding option', jruby: :exclude do
it 'raises invalid byte sequence in UTF-8 exception' do
expect { ReverseMarkdown.convert("hi \255") }.to raise_error(Encoding::CompatibilityError)
# Older versions of ruby used to raise ArgumentError here. Remove when we drop support for 3.1.
expect { ReverseMarkdown.convert("hi \255") }.to raise_error { [Encoding::CompatibilityError, ArgumentError].include?(_1.class) }
end

it 'handles invalid byte sequence if option is set' do
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require 'simplecov'
require 'debug'
require 'debug' unless RUBY_ENGINE == 'jruby'

SimpleCov.profiles.define 'gem' do
add_filter '/spec/'
Expand Down

0 comments on commit 45f35da

Please sign in to comment.