Skip to content

Commit

Permalink
Add a job for frozen-string-literal
Browse files Browse the repository at this point in the history
Followup to Shopify#102
  • Loading branch information
Earlopain committed May 7, 2024
1 parent 1430579 commit 8a2e1e3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ jobs:
matrix:
os: ["ubuntu-latest"]
ruby: ["ruby-head", "3.3", "3.2", "3.1", "3.0", "2.7", "2.6"]
include:
- ruby: "3.3"
rubyopt: "--enable-frozen-string-literal"
runs-on: ubuntu-latest
steps:
- name: Check out code
Expand All @@ -26,4 +29,4 @@ jobs:
run: sudo apt-get install -y ragel socat netcat

- name: Tests ${{ matrix.rubyopt }}
run: bundle exec rake
run: bundle exec rake RUBYOPT="${{ matrix.rubyopt }}"
4 changes: 3 additions & 1 deletion test/integration_test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ def http_get(url)

def spawn_server(*args, app:, config:, lint: true)
File.write("pitchfork.conf.rb", config)
env = lint ? { "RACK_ENV" => "development" } : {}
env = {}
env["RUBYOPT"] = ENV["RUBYOPT"] if ENV["RUBYOPT"]
env["RACK_ENV"] = "development" if lint
spawn(env, BIN, app, "-c", "pitchfork.conf.rb", *args)
end

Expand Down

0 comments on commit 8a2e1e3

Please sign in to comment.