Skip to content

Commit

Permalink
build: Stop using deprecated IntegrationTest config
Browse files Browse the repository at this point in the history
  • Loading branch information
johanandren committed Dec 20, 2023
1 parent 9c53fbb commit ef7308f
Show file tree
Hide file tree
Showing 26 changed files with 37 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:

- name: Compile all code with fatal warnings for Java 11, Scala 2.13
# Run locally with: sbt 'clean ; +Test/compile ; +It/compile'
run: sbt "; Test/compile; It/compile"
run: sbt "; Test/compile"

check-docs:
name: Check Docs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/mysql-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
run: ./scripts/launch-mysql.sh

- name: Run Integration tests for ${{ matrix.name }}
run: sbt "It/testOnly akka.persistence.jdbc.integration.MySQL*" ${{ matrix.extraOpts }} -J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler
run: sbt "testOnly akka.persistence.jdbc.integration.MySQL*" ${{ matrix.extraOpts }} -J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler

- name: Print logs on failure
if: ${{ failure() }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/oracle-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
run: ./scripts/launch-oracle.sh

- name: Run Integration tests for ${{ matrix.name }}
run: sbt "It/testOnly akka.persistence.jdbc.integration.Oracle*" ${{ matrix.extraOpts }} -J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler
run: sbt "testOnly akka.persistence.jdbc.integration.Oracle*" ${{ matrix.extraOpts }} -J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler

- name: Print logs on failure
if: ${{ failure() }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/postgres-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
run: ./scripts/launch-postgres.sh

- name: Run Integration tests for ${{ matrix.name }}
run: sbt "It/testOnly akka.persistence.jdbc.integration.Postgres*" ${{ matrix.extraOpts }} -J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler
run: sbt "testOnly akka.persistence.jdbc.integration.Postgres*" ${{ matrix.extraOpts }} -J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler

- name: Print logs on failure
if: ${{ failure() }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sqlserver-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
run: ./scripts/launch-sqlserver.sh

- name: Run Integration tests for ${{ matrix.name }}
run: sbt "It/testOnly akka.persistence.jdbc.integration.SqlServer*" ${{ matrix.extraOpts }} -J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler
run: sbt "testOnly akka.persistence.jdbc.integration.SqlServer*" ${{ matrix.extraOpts }} -J-XX:+UnlockExperimentalVMOptions -J-XX:+UseJVMCICompiler

- name: Print logs on failure
if: ${{ failure() }}
Expand Down
22 changes: 18 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ lazy val core = project
.in(file("core"))
.enablePlugins(MimaPlugin)
.disablePlugins(SitePlugin, CiReleasePlugin)
.configs(IntegrationTest.extend(Test))
.settings(Defaults.itSettings)
.settings(
name := "akka-persistence-jdbc",
libraryDependencies ++= Dependencies.Libraries,
Expand All @@ -24,18 +22,34 @@ lazy val core = project
organization.value %% name.value % previousStableVersion.value.getOrElse(
throw new Error("Unable to determine previous version for MiMa"))))

lazy val integration = project
.in(file("integration"))
.settings(IntegrationTests.settings)
.settings(
name := "akka-persistence-jdbc-integration",
libraryDependencies ++= Dependencies.Libraries,
).disablePlugins(MimaPlugin, SitePlugin, CiReleasePlugin)
.dependsOn(core)

lazy val migrator = project
.in(file("migrator"))
.disablePlugins(SitePlugin, MimaPlugin, CiReleasePlugin)
.configs(IntegrationTest.extend(Test))
.settings(Defaults.itSettings)
.settings(
name := "akka-persistence-jdbc-migrator",
libraryDependencies ++= Dependencies.Migration ++ Dependencies.Libraries,
// TODO remove this when ready to publish it
publish / skip := true)
.dependsOn(core % "compile->compile;test->test")

lazy val `migrator-integration` = project
.in(file("migrator-integration"))
.settings(IntegrationTests.settings)
.settings(
name := "akka-persistence-jdbc-migrator-integration",
libraryDependencies ++= Dependencies.Libraries,
).disablePlugins(MimaPlugin, SitePlugin, CiReleasePlugin)
.dependsOn(migrator)

lazy val docs = project
.enablePlugins(ProjectAutoPlugin, AkkaParadoxPlugin, ParadoxSitePlugin, PreprocessPlugin, PublishRsyncPlugin)
.disablePlugins(MimaPlugin, CiReleasePlugin)
Expand Down
14 changes: 14 additions & 0 deletions project/IntegrationTests.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import de.heikoseeberger.sbtheader.HeaderPlugin.autoImport.headerSettings
import sbt.*
import sbt.Keys.*

object IntegrationTests {

def settings: Seq[Def.Setting[_]] =
Seq(
publish / skip := true,
doc / sources := Seq.empty,
Test / fork := true
)

}

0 comments on commit ef7308f

Please sign in to comment.