Skip to content

Commit

Permalink
Install rbs globally
Browse files Browse the repository at this point in the history
  • Loading branch information
pocke committed Jan 24, 2024
1 parent 8ac2feb commit f373f98
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ jobs:
with:
ruby-version: '3.2'
bundler-cache: true
- name: Run bin/setup
run: bin/setup
- name: Get changed gems
id: changes
run: |
Expand Down Expand Up @@ -62,5 +64,7 @@ jobs:
with:
ruby-version: '3.2'
bundler-cache: true
- name: Run bin/setup
run: bin/setup
- name: Run test on all gems
run: bin/test --all --verbose
1 change: 1 addition & 0 deletions bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ set -v
ROOT_DIR=$(cd $(dirname $0)/..; pwd)

bundle install --gemfile=${ROOT_DIR}/Gemfile
gem install rbs:$(bundle exec gem list rbs | ruby -e 'puts gets[/([0-9.]+)/, 1]')
5 changes: 2 additions & 3 deletions bin/test
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ class Runner
@test_dir = base_dir / "_test"
@version = base_dir.basename.to_s
@gem_name = base_dir.parent.basename.to_s
@rbs_command = `bundle exec which rbs`.chomp
end

def run
Expand All @@ -69,7 +68,7 @@ class Runner

private

attr_reader :base_dir, :test_dir, :version, :gem_name, :rbs_command
attr_reader :base_dir, :test_dir, :version, :gem_name

def generate_gemfile_lock
v = "~> #{version}"
Expand All @@ -96,7 +95,7 @@ class Runner
end

def rbs_collection_install
sh! rbs_command, 'collection', 'install', chdir: test_dir.to_s
sh! 'rbs', 'collection', 'install', chdir: test_dir.to_s
end

def remove_gemfile_lock
Expand Down

0 comments on commit f373f98

Please sign in to comment.