Skip to content

Commit

Permalink
Using test-queue
Browse files Browse the repository at this point in the history
  • Loading branch information
S-H-GAMELINKS committed Sep 4, 2024
1 parent c958a16 commit ca2522e
Show file tree
Hide file tree
Showing 20 changed files with 31 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
run: bundle exec rubocop

- name: Run tests
run: bundle exec rake test
run: bundle exec rake queue:test

- name: Run install
run: |
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ end

group :test do
gem 'minitest', require: false
gem 'test-queue', require: false
end
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ GEM
rubocop-rake (0.6.0)
rubocop (~> 1.0)
ruby-progressbar (1.13.0)
test-queue (0.11.1)
unicode-display_width (2.5.0)
zlib (3.1.1)

Expand All @@ -63,6 +64,7 @@ DEPENDENCIES
rubocop-minitest
rubocop-on-rbs
rubocop-rake
test-queue

BUNDLED WITH
2.6.0.dev
9 changes: 9 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
require 'bundler/gem_tasks'
require 'rake/extensiontask'
require 'rake/testtask'
require 'test_queue'
require 'test_queue/runner/minitest'
require 'fileutils'

COPY_TARGETS = %w[
Expand Down Expand Up @@ -154,6 +156,13 @@ Rake::ExtensionTask.new('kanayago', GEMSPEC) do |ext|
ext.lib_dir = 'lib/kanayago'
end

namespace :queue do
desc 'run test with test-queue'
task :test do
sh 'bundle exec minitest-queue $(find test/ -name \*_test.rb)'
end
end

Rake::TestTask.new(:test) do |t|
t.libs << 'test'
t.libs << 'lib'
Expand Down
2 changes: 1 addition & 1 deletion test/kanayago/parse_class_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require 'test_helper'
require_relative '../test_helper'

class ParseClassTest < Minitest::Test
def test_parse_class
Expand Down
2 changes: 1 addition & 1 deletion test/kanayago/parse_const_decl_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require 'test_helper'
require_relative '../test_helper'

class ParseConstDeclTest < Minitest::Test
def test_parse_const_decl
Expand Down
2 changes: 1 addition & 1 deletion test/kanayago/parse_const_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require 'test_helper'
require_relative '../test_helper'

class ParseConstTest < Minitest::Test
def test_parse_const
Expand Down
2 changes: 1 addition & 1 deletion test/kanayago/parse_defn_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require 'test_helper'
require_relative '../test_helper'

class ParseDefnTest < Minitest::Test
def test_parse_defn
Expand Down
2 changes: 1 addition & 1 deletion test/kanayago/parse_fcall_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require 'test_helper'
require_relative '../test_helper'

class ParseFcallTest < Minitest::Test
def test_parse_fcall
Expand Down
2 changes: 1 addition & 1 deletion test/kanayago/parse_float_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require 'test_helper'
require_relative '../test_helper'

class ParseFloatTest < Minitest::Test
def test_parse_float
Expand Down
2 changes: 1 addition & 1 deletion test/kanayago/parse_if_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require 'test_helper'
require_relative '../test_helper'

class ParseIfTest < Minitest::Test
def test_parse_if
Expand Down
2 changes: 2 additions & 0 deletions test/kanayago/parse_imaginary_test.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

require_relative '../test_helper'

class ParseImaginaryTest < Minitest::Test
def test_parse_imaginary
result = Kanayago.parse('117i')
Expand Down
2 changes: 1 addition & 1 deletion test/kanayago/parse_integer_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require 'test_helper'
require_relative '../test_helper'

class ParseIntegerTest < Minitest::Test
def test_parse_integer
Expand Down
2 changes: 1 addition & 1 deletion test/kanayago/parse_ivar_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require 'test_helper'
require_relative '../test_helper'

class ParseIvarTest < Minitest::Test
def test_parse_ivar
Expand Down
2 changes: 1 addition & 1 deletion test/kanayago/parse_lasgn_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require 'test_helper'
require_relative '../test_helper'

class ParseLasgnTest < Minitest::Test
def test_parse_lasgn
Expand Down
2 changes: 1 addition & 1 deletion test/kanayago/parse_lvar_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require 'test_helper'
require_relative '../test_helper'

class ParseLvarTest < Minitest::Test
def test_parse_lvar
Expand Down
2 changes: 1 addition & 1 deletion test/kanayago/parse_rational_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require 'test_helper'
require_relative '../test_helper'

class ParseRationalTest < Minitest::Test
def test_parse_rational
Expand Down
2 changes: 2 additions & 0 deletions test/kanayago/parse_string_test.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

require_relative '../test_helper'

class ParseStringTest < Minitest::Test
def test_parse_string
result = Kanayago.parse('"Kanayago"')
Expand Down
2 changes: 1 addition & 1 deletion test/kanayago/parse_sym_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require 'test_helper'
require_relative '../test_helper'

class ParseSymTest < Minitest::Test
def test_parse_sym
Expand Down
2 changes: 1 addition & 1 deletion test/kanayago/parse_unless_test.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require 'test_helper'
require_relative '../test_helper'

class ParseUnlessTest < Minitest::Test
def test_parse_unless
Expand Down

0 comments on commit ca2522e

Please sign in to comment.