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 600a7c8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,17 @@ on: [push, pull_request]

jobs:
ruby:
name: Ruby ${{ matrix.ruby }}
name: Ruby ${{ matrix.ruby }} ${{ matrix.rubyopt }}
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
ruby: ["ruby-head", "3.3", "3.2", "3.1", "3.0", "2.7", "2.6"]
rubyopt: [""]
include:
- ruby: "3.3"
rubyopt: "--enable-frozen-string-literal"
runs-on: ubuntu-latest
steps:
- name: Check out code
Expand All @@ -26,4 +30,4 @@ jobs:
run: sudo apt-get install -y ragel socat netcat

- name: Tests ${{ matrix.rubyopt }}
run: bundle exec rake
run: RUBYOPT="${{ matrix.rubyopt }}" bundle exec rake
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 600a7c8

Please sign in to comment.