Skip to content

Commit

Permalink
Hack to use a single bundle dir in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
grncdr committed May 20, 2023
1 parent 5d6fc92 commit aad3fe4
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 43 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@ jobs:
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- uses: ruby/setup-ruby@v1
with:
working-directory: spec/rails${{ matrix.rails-version }}
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: RSpec
run: bundle exec rspec spec/solargraph-rails

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ spec/rails7/tmp/
# rspec failure tracking
.rspec_status
Gemfile.lock
vendor
16 changes: 13 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
source "https://rubygems.org"
source 'https://rubygems.org'

git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }

# Kind of ugly, but works. The setup-ruby action forces gems to be installed to vendor/bundle
# If we use it naively we end up with vendor/bundle and spec/rails7/vendor/bundle, which
# breaks all the tests because docs are generated in two different directories.
#
# So if we just install the rails deps at the same time, we have a single cache and a single
# directory for gems.
plugin 'auto_yard', path: './ci/auto_yard'
rails_version = ENV['MATRIX_RAILS_VERSION'] || '7'
instance_eval File.read("spec/rails#{rails_version}/Gemfile")

group :development, :test do
gem 'byebug'
gem 'bundler-audit'
gem 'byebug'
end

# Specify your gem's dependencies in solargraph_rails.gemspec
gemspec
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 0 additions & 12 deletions spec/definitions/rails7/actioncontroller.yml
Original file line number Diff line number Diff line change
Expand Up @@ -577,10 +577,6 @@ ActionController::Base.protect_from_forgery:
types:
- undefined
skip: false
ActionController::Base.pry:
types:
- undefined
skip: false
ActionController::Base.raise_on_open_redirects:
types:
- undefined
Expand All @@ -589,10 +585,6 @@ ActionController::Base.raise_on_open_redirects=:
types:
- undefined
skip: true
ActionController::Base.rake_extension:
types:
- undefined
skip: false
ActionController::Base.redefine_method:
types:
- undefined
Expand Down Expand Up @@ -1395,10 +1387,6 @@ ActionController::Base#process:
types:
- undefined
skip: false
ActionController::Base#pry:
types:
- undefined
skip: false
ActionController::Base#raise_on_missing_translations:
types:
- undefined
Expand Down
12 changes: 0 additions & 12 deletions spec/definitions/rails7/activerecord.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1613,10 +1613,6 @@ ActiveRecord::Base.protected_environments=:
types:
- undefined
skip: false
ActiveRecord::Base.pry:
types:
- undefined
skip: false
ActiveRecord::Base.queues:
types:
- undefined
Expand All @@ -1633,10 +1629,6 @@ ActiveRecord::Base.quoted_table_name:
types:
- undefined
skip: false
ActiveRecord::Base.rake_extension:
types:
- undefined
skip: false
ActiveRecord::Base.reading_role:
types:
- undefined
Expand Down Expand Up @@ -2969,10 +2961,6 @@ ActiveRecord::Base#primary_key_prefix_type?:
types:
- undefined
skip: true
ActiveRecord::Base#pry:
types:
- undefined
skip: false
ActiveRecord::Base#query_attribute:
types:
- undefined
Expand Down
4 changes: 2 additions & 2 deletions spec/definitions/rails7/core/Time.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Time.zone_default=:
skip: false
Time#+:
types:
- Time
- undefined
skip: false
Time#-:
types:
Expand Down Expand Up @@ -442,7 +442,7 @@ Time#to_fs:
skip: false
Time#to_time:
types:
- Time
- undefined
skip: false
Time#today?:
types:
Expand Down
9 changes: 0 additions & 9 deletions spec/rails7/Gemfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
source 'https://rubygems.org'

plugin 'auto_yard', path: '../auto_yard'

gem 'devise'
gem 'pry-rails'
gem 'rails', '~> 7.0.4'
gem 'sqlite3'

group :development do
gem 'rdbg'
gem 'solargraph', require: false
gem 'solargraph-rails', require: false, path: '../..'
end

0 comments on commit aad3fe4

Please sign in to comment.