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 a7aece4
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 19 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: CI

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

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

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: Update Bundler
run: gem install bundler

- 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: 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

0 comments on commit a7aece4

Please sign in to comment.