Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby: [ '3.0', '3.1', '3.2', '3.3' ]
ruby: [ '3.2', '3.3', '3.4', '4.0' ]
env:
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }}
HEROKU_API_USER: ${{ secrets.HEROKU_API_USER }}
Expand All @@ -21,8 +21,10 @@ jobs:
with:
ruby-version: ${{ matrix.ruby }}

- name: "Set bundler path"
run: bundle config set path 'vendor/bundle'
- name: "Install dependencies"
run: bundle install --jobs=4 --retry=3 --path vendor/bundle
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is no longer supported in Ruby 4.0. The fix is to set the path with bundle config set path 'vendor/bundle'

run: bundle install --jobs=4 --retry=3
- name: "Hatchet setup"
run: bundle exec hatchet ci:setup
- name: "Run tests"
Expand Down
4 changes: 4 additions & 0 deletions spec/acceptance/generated_client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
@app_name = ENV["TEST_APP_NAME"] || hatchet_app.name
end

after(:all) do
hatchet_app.teardown!
end

def app_name
@app_name
end
Expand Down
3 changes: 2 additions & 1 deletion spec/support/helper_methods.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
module PlatformAPI::SpecHelperMethods
def hatchet_app
config = { "FOO" => "bar" }
@hatchet_app ||= begin
app = Hatchet::Runner.new("default_ruby", buildpacks: ["heroku/ruby"])
app = Hatchet::Runner.new("default_ruby", buildpacks: ["heroku/ruby"], config: config)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had to add this to fix the test where config vars are checked. The config vars were returning empty and causing the test to fail.

By adding this, we force the hatchet app to have some config vars that can be checked in the test.

I am not sure how this worked before, but my guess is that it used DATABASE_URL or other configs that may take some time to appear on the app, depending on the provisioning time.

app.in_directory do
app.setup!
app.push_with_retry!
Expand Down