Skip to content
Merged
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
16 changes: 11 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,18 @@ name: ubuntu
on: [push, pull_request]

jobs:
build:
ruby-versions:
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
with:
engine: cruby
min_version: 2.4

test:
needs: ruby-versions
name: build (${{ matrix.ruby }} / ${{ matrix.os }})
strategy:
matrix:
ruby: [ 2.7, 2.6, 2.5, 2.4, head ]
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
os: [ ubuntu-latest, macos-latest ]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -16,7 +23,6 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
- name: Install dependencies
run: bundle install
bundler-cache: true
- name: Run test
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opportunity: can use setup-ruby's bunder-cache: true and omit the bundle install step.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

run: rake test
run: bundle exec rake test
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ gemspec
gem "bundler"
gem "rake"
gem "test-unit"
gem "test-unit-ruby-core"
7 changes: 0 additions & 7 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,4 @@ Rake::TestTask.new(:test) do |t|
t.test_files = FileList["test/**/test_*.rb"]
end

task :sync_tool do
require 'fileutils'
FileUtils.cp "../ruby/tool/lib/core_assertions.rb", "./test/lib"
FileUtils.cp "../ruby/tool/lib/envutil.rb", "./test/lib"
FileUtils.cp "../ruby/tool/lib/find_executable.rb", "./test/lib"
end

task :default => :test
Loading