Skip to content

Commit

Permalink
more build improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
maths22 committed Mar 18, 2022
1 parent 414a3ab commit f22c251
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 2 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,17 @@ jobs:
PGUSER: postgres
PGPASSWORD: postgres
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
lint:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true
- name: Install dependencies
run: bundle install
- name: Run rubocop
run: bundle exec rake rubocop
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ AllCops:
NewCops: enable
Exclude:
- 'gemfiles/*'
- 'vendor/bundle/**/*'

Style/StringLiterals:
Enabled: true
Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ GEM
minitest (5.15.0)
nokogiri (1.13.3-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.13.3-x86_64-linux)
racc (~> 1.4)
parallel (1.20.1)
parser (3.0.1.1)
ast (~> 2.4.1)
Expand Down
2 changes: 1 addition & 1 deletion Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ require "rubocop/rake_task"

RuboCop::RakeTask.new

task default: %i[spec rubocop]
task default: %i[spec]
2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def executed_statements

%w[execute exec_no_cache exec_cache].each do |method|
class_eval <<-RUBY, __FILE__, __LINE__ + 1
def #{method}(statement, *, **kwargs)
def #{method}(statement, *#{Rails.version >= '7.0' ? ', **kwargs' : ''})
materialize_transactions # this still needs to get called, even if we skip actually executing
executed_statements << statement
return empty_pg_result if @dont_execute
Expand Down

0 comments on commit f22c251

Please sign in to comment.