Skip to content

Commit

Permalink
Use ruby/setup-ruby action and test app Gemfile for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
grncdr committed May 14, 2023
1 parent ca1ea40 commit 33f5348
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 43 deletions.
22 changes: 14 additions & 8 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,26 @@ jobs:
solargraph-version:
- "0.48.0"
- "0.49.0"
rails-version:
- "7"
fail-fast: false

steps:
- uses: actions/checkout@v2
- name: Cache RVM
- uses: ruby/setup-ruby@v1
with:
working-directory: spec/rails${{ matrix.rails-version }}
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true

- name: Cache yardoc
uses: actions/cache@v3
id: rvm
with:
key: ${{ runner.os }}-rvm-${{ matrix.ruby-version }}
key: ${{ runner.os }}-yard-${{ matrix.ruby-version }}-${{ matrix.solargraph-version }}
path: |
/home/runner/.rvm
/home/runner/.yardoc
#/usr/local/rvm/
#- name: Setup upterm session
# uses: lhotari/action-upterm@v1
- name: Test
run: "/bin/bash ./ci.sh ${{ matrix.ruby-version }} ${{ matrix.solargraph-version}}"
- name: RSpec
run: bundle exec rspec

34 changes: 0 additions & 34 deletions ci.sh

This file was deleted.

5 changes: 4 additions & 1 deletion solargraph-rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'solargraph/rails/version'


solargraph_version = (ENV['CI'] && ENV['MATRIX_SOLARGRAPH_VERSION']) || ">= 0.48.0"

Gem::Specification.new do |spec|
spec.name = 'solargraph-rails'
spec.version = Solargraph::Rails::VERSION
Expand All @@ -27,6 +30,6 @@ Gem::Specification.new do |spec|
spec.add_development_dependency 'rake', '~> 12.3.3'
spec.add_development_dependency 'rspec', '~> 3.0'

spec.add_runtime_dependency 'solargraph'
spec.add_runtime_dependency 'solargraph', solargraph_version
spec.add_runtime_dependency 'activesupport'
end
5 changes: 5 additions & 0 deletions spec/rails7/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ group :development do
gem 'solargraph', require: false
gem 'solargraph-rails', require: false, path: '../..'
end

group :test do
# not strictly needed but simplifies the CI setup.
gem 'rspec'
end

0 comments on commit 33f5348

Please sign in to comment.