Skip to content

Commit

Permalink
Add TruffleRuby and JRuby nightly tests
Browse files Browse the repository at this point in the history
  • Loading branch information
peterfication committed Jan 9, 2024
1 parent 35e2ea8 commit eaa4015
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 17 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/jruby-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: JRuby Nightly

on: push
# on:
# schedule:
# # Checks daily
# - cron: '0 0 * * *'

jobs:
TestsOnNightly:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: rm Gemfile.lock
- uses: ruby/setup-ruby@v1
with:
ruby-version: jruby-head
bundler-cache: true
- run: bundle exec rspec
19 changes: 19 additions & 0 deletions .github/workflows/truffleruby-nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: TruffleRuby Nightly

on: push
# on:
# schedule:
# # Checks daily
# - cron: '0 0 * * *'

jobs:
TestsOnNightly:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: rm Gemfile.lock
- uses: ruby/setup-ruby@v1
with:
ruby-version: truffleruby-head
bundler-cache: true
- run: bundle exec rspec
23 changes: 14 additions & 9 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,19 @@ source "https://rubygems.org"

gemspec

gem "byebug"
gem "prettier"
gem "pry"
gem "pry-byebug"
gem "rake"
gem "rspec"
gem "rubocop"
gem "rubocop-rake"
gem "rubocop-rspec"
gem "simplecov"
gem "solargraph"

gem "racc" # Needed for JRuby, see https://github.com/jruby/jruby/issues/6581

Check warning on line 8 in Gemfile

View workflow job for this annotation

GitHub Actions / Spellcheck

Unknown word (racc)

platforms :ruby, :mingw do
gem "byebug"
gem "prettier"
gem "pry"
gem "pry-byebug"
gem "rubocop"
gem "rubocop-rake"
gem "rubocop-rspec"
gem "simplecov"
gem "solargraph" unless RUBY_ENGINE == "truffleruby"
end
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,16 @@ GEM

PLATFORMS
arm64-darwin-21
java
ruby
unknown

DEPENDENCIES
byebug
prettier
pry
pry-byebug
racc
rake
rspec
rspec-graphql-integration!
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@
<a href="https://github.com/peterfication/rspec-graphql-integration/actions/workflows/ruby-nightly.yml">
<img alt="CI" src="https://github.com/peterfication/rspec-graphql-integration/actions/workflows/ruby-nightly.yml/badge.svg" \>
</a>
<a href="https://github.com/peterfication/rspec-graphql-integration/actions/workflows/truffleruby-nightly.yml">
<img alt="CI" src="https://github.com/peterfication/rspec-graphql-integration/actions/workflows/truffleruby-nightly.yml/badge.svg" \>
</a>
<a href="https://github.com/peterfication/rspec-graphql-integration/actions/workflows/jruby-nightly.yml">
<img alt="CI" src="https://github.com/peterfication/rspec-graphql-integration/actions/workflows/jruby-nightly.yml/badge.svg" \>
</a>
</p>

<p align="center">
Expand Down
20 changes: 12 additions & 8 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
require "simplecov"
require "byebug"
require "pry"
require "pry-byebug"
begin
require "simplecov"
require "byebug"
require "pry"
require "pry-byebug"

SimpleCov.start do
enable_coverage :branch
primary_coverage :branch
minimum_coverage 100
SimpleCov.start do
enable_coverage :branch
primary_coverage :branch
minimum_coverage 100
end
rescue LoadError
# In TruffleRuby and JRuby, those gems are not installed.
end

require_relative "support/graphql_integration"
Expand Down

0 comments on commit eaa4015

Please sign in to comment.