Skip to content

Commit

Permalink
Add heroku-24 to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Malax committed Jun 6, 2024
1 parent 6f2e27d commit b1ab0f5
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
fail-fast: false
matrix:
stack: ["heroku-20", "heroku-22"]
stack: ["heroku-20", "heroku-22", "heroku-24"]
env:
HATCHET_APP_LIMIT: 100
HATCHET_EXPENSIVE_MODE: 1
Expand Down Expand Up @@ -85,12 +85,12 @@ jobs:
name: "Unit Tests (${{ matrix.stack }})"
runs-on: ubuntu-22.04
container:
image: "${{ fromJson('{ \"heroku-20\": \"heroku/heroku:20\", \"heroku-22\": \"heroku/heroku:22\" }')[matrix.stack] }}"
image: "${{ fromJson('{ \"heroku-20\": \"heroku/heroku:20\", \"heroku-22\": \"heroku/heroku:22\", \"heroku-24\": \"heroku/heroku:24\" }')[matrix.stack] }}"
env:
STACK: ${{ matrix.stack }}
strategy:
matrix:
stack: ["heroku-20", "heroku-22"]
stack: ["heroku-20", "heroku-22", "heroku-24"]
steps:
- uses: actions/checkout@v4
- run: test/unit
6 changes: 6 additions & 0 deletions test/spec/db_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
Hatchet::Runner.new("java-apache-dbcp-sample", stack: ENV["HEROKU_TEST_STACK"]).tap do |app|
app.before_deploy do
set_java_version(DEFAULT_OPENJDK_VERSION)

begin
app.add_database(plan: "heroku-postgresql:essential-0")
rescue Excon::Error => e
puts e.response.body
end
end

app.deploy do
Expand Down
2 changes: 2 additions & 0 deletions test/spec/java_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
set_java_version(openjdk_version)
end

app.add_database(plan: "heroku-postgresql:essential-0")

app.deploy do
expect(app.output).to include("Installing OpenJDK #{openjdk_version}")
expect(app.output).to include("BUILD SUCCESS")
Expand Down
2 changes: 2 additions & 0 deletions test/spec/maven_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
set_maven_version("3.2.5")
end

app.add_database(plan: "heroku-postgresql:essential-0")

app.deploy do
expect(app.output).to include("Installing Maven 3.2.5")
expect(app.output).not_to include("BUILD FAILURE")
Expand Down
4 changes: 1 addition & 3 deletions test/spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
require "hatchet"
require "java-properties"

# Omitting 1.7 here since most example projects used in testing are not
# compatible with 1.7.
OPENJDK_VERSIONS=%w(1.8 11 13 15)
OPENJDK_VERSIONS=%w(1.8 11 17 21)
DEFAULT_OPENJDK_VERSION="1.8"

RSpec.configure do |config|
Expand Down

0 comments on commit b1ab0f5

Please sign in to comment.