Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add sorted_set as gem dependency if using ruby 3.0 and above #54

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Tests

on: [push, pull_request]

defaults:
run:
shell: bash

jobs:
test:
name: 'run Tests'
# skip on [ci skip] and do not run 2 on push and interal PR
if: (contains(github.event.commits[0].message, '[ci skip]') == false) && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository)
continue-on-error: ${{ matrix.allow_failure || false }}
strategy:
fail-fast: false

matrix:
ruby: [2.5, 2.7, 3.1]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Run specs
run: |
RAILS_ENV=test bundle exec rake
4 changes: 4 additions & 0 deletions rumoji.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ Gem::Specification.new do |gem|
gem.summary = %q{Transcode emoji utf-8 characters into emoji-cheat-sheet form}
gem.homepage = ""

if RUBY_VERSION >= '3.0'
gem.add_dependency "sorted_set"
end

gem.files = `git ls-files`.split($/)
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
Expand Down