Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: Stop using deprecated IntegrationTest config #792

Merged
merged 2 commits into from
Dec 21, 2023
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
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
18 changes: 14 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,30 @@ 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
10 changes: 10 additions & 0 deletions project/IntegrationTests.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
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)

}