Skip to content

Commit

Permalink
Fix compatibility with --frozen-string-literal
Browse files Browse the repository at this point in the history
  • Loading branch information
chaadow committed Jun 10, 2024
1 parent c5987d5 commit 5797699
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,21 @@ jobs:
matrix:
ruby: [ '3.1', '3.2', '3.3', 'head' ]
rails: [ '7.1', 'edge' ]
rubyopt: [""]
include:
- ruby: '2.7'
rails: '6.1'
- ruby: '3.0'
rails: '6.1'
- ruby: '3.1'
rails: '7.0'
- ruby: '3.3'
rails: 'edge'
rubyopt: "--enable-frozen-string-literal"

env:
RAILS_VERSION: ${{ matrix.rails }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
Expand All @@ -29,10 +31,10 @@ jobs:
bundler-cache: true

- name: Run unit tests
run: bundle exec rake test:unit
run: bundle exec rake test:unit RUBYOPT="${{ matrix.rubyopt }}"
timeout-minutes: 3

- name: Run acceptance tests
run: bundle exec rake test:acceptance
run: bundle exec rake test:acceptance RUBYOPT="${{ matrix.rubyopt }}"
timeout-minutes: 10
if: ${{ matrix.rails != 'edge' && matrix.ruby != 'head' }} # Acceptance tests use `gem install rails && rails new`
2 changes: 1 addition & 1 deletion test/support/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def read_streams
end

def read_stream(stream)
output = ""
output = +""
while IO.select([stream], [], [], 0.5) && !stream.eof?
output << stream.readpartial(10240)
end
Expand Down

0 comments on commit 5797699

Please sign in to comment.