diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml new file mode 100644 index 0000000..5facd49 --- /dev/null +++ b/.github/workflows/ruby.yml @@ -0,0 +1,31 @@ +# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake +# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby + +name: Ruby + +on: + push: + workflow_dispatch: + +permissions: + contents: read + +jobs: + test: + + runs-on: ubuntu-latest + strategy: + matrix: + ruby-version: ['3.0'] + + steps: + - uses: actions/checkout@v4 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - name: Run tests + run: bundle exec rspec + - name: Run RuboCop + run: bundle exec rubocop diff --git a/Gemfile b/Gemfile index a0b0428..eabfc3d 100644 --- a/Gemfile +++ b/Gemfile @@ -5,8 +5,8 @@ source 'https://rubygems.org' # Specify your gem's dependencies in sheet_zoukas.gemspec gemspec -gem 'rake', '~> 13.0' - -gem 'rspec', '~> 3.0' - -gem 'rubocop', '~> 1.21' +group :development, :test do + gem 'rake', '~> 13.0' + gem 'rspec', '~> 3.0' + gem 'rubocop', '~> 1.21' +end diff --git a/sheet_zoukas.gemspec b/sheet_zoukas.gemspec index 3757d38..9762880 100644 --- a/sheet_zoukas.gemspec +++ b/sheet_zoukas.gemspec @@ -36,7 +36,7 @@ Gem::Specification.new do |spec| spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) } spec.require_paths = ['lib'] - spec.add_development_dependency 'rspec' + # spec.add_development_dependency 'rspec' spec.metadata['rubygems_mfa_required'] = 'true' end