From df0e62e4b98ce7a5a0993d18aef37ff862a6cc7d Mon Sep 17 00:00:00 2001 From: Manuel Fuchs Date: Wed, 5 Jun 2024 12:43:13 +0200 Subject: [PATCH] Add heroku-24 to CI (#244) --- .github/workflows/ci.yml | 2 +- test/compile_test.sh | 88 +------------------ .../play-2.2.x-scala-sample/system.properties | 1 + .../play-2.3.x-scala-sample/system.properties | 1 + .../repos/play-2.4.x-scala/system.properties | 1 + .../system.properties | 2 +- .../repos/sbt-one-example/system.properties | 1 + .../sbt-start-script-sample/system.properties | 1 + 8 files changed, 9 insertions(+), 88 deletions(-) create mode 100644 test/spec/fixtures/repos/play-2.2.x-scala-sample/system.properties create mode 100644 test/spec/fixtures/repos/play-2.3.x-scala-sample/system.properties create mode 100644 test/spec/fixtures/repos/play-2.4.x-scala/system.properties create mode 100644 test/spec/fixtures/repos/sbt-one-example/system.properties create mode 100644 test/spec/fixtures/repos/sbt-start-script-sample/system.properties diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d8b73b7..08a6571 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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_RUN_MULTI: 1 diff --git a/test/compile_test.sh b/test/compile_test.sh index e2df8f8..e4f3f2f 100644 --- a/test/compile_test.sh +++ b/test/compile_test.sh @@ -2,9 +2,8 @@ . ${BUILDPACK_TEST_RUNNER_HOME}/lib/test_utils.sh -DEFAULT_SBT_VERSION="0.13.17" -DEFAULT_PLAY_VERSION="2.3.4" -DEFAULT_SCALA_VERSION="2.12.7" +DEFAULT_SBT_VERSION="1.10.0" +DEFAULT_SCALA_VERSION="2.13.14" SBT_TEST_CACHE="/tmp/sbt-test-cache" SBT_STAGING_STRING="THIS_STRING_WILL_BE_OUTPUT_DURING_STAGING" @@ -37,73 +36,10 @@ sbt.version=${sbtVersion} EOF } -_primeSbtTestCache() -{ - local sbtVersion=${1:-${DEFAULT_SBT_VERSION}} - - # exit code of app compile is cached so it is consistant between runn - local compileStatusFile=${SBT_TEST_CACHE}/${sbtVersion}/app/compile_status - - if [ ! -f ${compileStatusFile} ]; then - [ -d ${SBT_TEST_CACHE}/${sbtVersion} ] && rm -r ${SBT_TEST_CACHE}/${sbtVersion} - - ORIGINAL_BUILD_DIR=${BUILD_DIR} - ORIGINAL_CACHE_DIR=${CACHE_DIR} - - BUILD_DIR=${SBT_TEST_CACHE}/${sbtVersion}/app/build - CACHE_DIR=${SBT_TEST_CACHE}/${sbtVersion}/app/cache - mkdir -p ${BUILD_DIR} ${CACHE_DIR} - - _createSbtProject ${sbtVersion} ${BUILD_DIR} - ${BUILDPACK_HOME}/bin/compile ${BUILD_DIR} ${CACHE_DIR} >/dev/null 2>&1 - echo "$?" > ${compileStatusFile} - - BUILD_DIR=${ORIGINAL_BUILD_DIR} - CACHE_DIR=${ORIGINAL_CACHE_DIR} - fi - - return $(cat ${compileStatusFile}) -} - -_primeIvyCache() -{ - local sbtVersion=${1:-${DEFAULT_SBT_VERSION}} - - ivy2_path=.sbt_home/.ivy2 - mkdir -p ${CACHE_DIR}/${ivy2_path} - _primeSbtTestCache ${sbtVersion} && cp -r ${SBT_TEST_CACHE}/${sbtVersion}/app/cache/${ivy2_path}/cache ${CACHE_DIR}/${ivy2_path} -} - -createPlayProject() -{ - local playVersion=${1:-${DEFAULT_PLAY_VERSION}} - local sbtVersion=${2:-${DEFAULT_SBT_VERSION}} - local scalaVersion=${3:-${DEFAULT_SCALA_VERSION}} - - mkdir -p ${BUILD_DIR}/conf ${BUILD_DIR}/project - touch ${BUILD_DIR}/conf/application.conf - cat > ${BUILD_DIR}/project/plugins.sbt < ${BUILD_DIR}/build.sbt < ${BUILD_DIR}/project/build.properties <