diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 444ec2bb0..31d6b17e7 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -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 diff --git a/.github/workflows/mysql-tests.yml b/.github/workflows/mysql-tests.yml index b4f8e5aab..e1764539b 100644 --- a/.github/workflows/mysql-tests.yml +++ b/.github/workflows/mysql-tests.yml @@ -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() }} diff --git a/.github/workflows/oracle-tests.yml b/.github/workflows/oracle-tests.yml index b166cf880..00f118dd3 100644 --- a/.github/workflows/oracle-tests.yml +++ b/.github/workflows/oracle-tests.yml @@ -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() }} diff --git a/.github/workflows/postgres-tests.yml b/.github/workflows/postgres-tests.yml index f8327d4b8..54603b6a8 100644 --- a/.github/workflows/postgres-tests.yml +++ b/.github/workflows/postgres-tests.yml @@ -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() }} diff --git a/.github/workflows/sqlserver-tests.yml b/.github/workflows/sqlserver-tests.yml index 9f016119a..a5926839b 100644 --- a/.github/workflows/sqlserver-tests.yml +++ b/.github/workflows/sqlserver-tests.yml @@ -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() }} diff --git a/build.sbt b/build.sbt index fba1c7b67..21f479985 100644 --- a/build.sbt +++ b/build.sbt @@ -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, @@ -24,11 +22,16 @@ 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, @@ -36,6 +39,13 @@ lazy val migrator = project 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) diff --git a/core/src/it/scala/akka/persistence/jdbc/integration/AllPersistenceIdsTest.scala b/integration/src/test/scala/akka/persistence/jdbc/integration/AllPersistenceIdsTest.scala similarity index 100% rename from core/src/it/scala/akka/persistence/jdbc/integration/AllPersistenceIdsTest.scala rename to integration/src/test/scala/akka/persistence/jdbc/integration/AllPersistenceIdsTest.scala diff --git a/core/src/it/scala/akka/persistence/jdbc/integration/CurrentEventsByPersistenceIdTest.scala b/integration/src/test/scala/akka/persistence/jdbc/integration/CurrentEventsByPersistenceIdTest.scala similarity index 100% rename from core/src/it/scala/akka/persistence/jdbc/integration/CurrentEventsByPersistenceIdTest.scala rename to integration/src/test/scala/akka/persistence/jdbc/integration/CurrentEventsByPersistenceIdTest.scala diff --git a/core/src/it/scala/akka/persistence/jdbc/integration/CurrentEventsByTagTest.scala b/integration/src/test/scala/akka/persistence/jdbc/integration/CurrentEventsByTagTest.scala similarity index 100% rename from core/src/it/scala/akka/persistence/jdbc/integration/CurrentEventsByTagTest.scala rename to integration/src/test/scala/akka/persistence/jdbc/integration/CurrentEventsByTagTest.scala diff --git a/core/src/it/scala/akka/persistence/jdbc/integration/CurrentPersistenceIdsTest.scala b/integration/src/test/scala/akka/persistence/jdbc/integration/CurrentPersistenceIdsTest.scala similarity index 100% rename from core/src/it/scala/akka/persistence/jdbc/integration/CurrentPersistenceIdsTest.scala rename to integration/src/test/scala/akka/persistence/jdbc/integration/CurrentPersistenceIdsTest.scala diff --git a/core/src/it/scala/akka/persistence/jdbc/integration/EventAdapterTest.scala b/integration/src/test/scala/akka/persistence/jdbc/integration/EventAdapterTest.scala similarity index 100% rename from core/src/it/scala/akka/persistence/jdbc/integration/EventAdapterTest.scala rename to integration/src/test/scala/akka/persistence/jdbc/integration/EventAdapterTest.scala diff --git a/core/src/it/scala/akka/persistence/jdbc/integration/EventsByPersistenceIdTest.scala b/integration/src/test/scala/akka/persistence/jdbc/integration/EventsByPersistenceIdTest.scala similarity index 100% rename from core/src/it/scala/akka/persistence/jdbc/integration/EventsByPersistenceIdTest.scala rename to integration/src/test/scala/akka/persistence/jdbc/integration/EventsByPersistenceIdTest.scala diff --git a/core/src/it/scala/akka/persistence/jdbc/integration/EventsByTagMigrationTest.scala b/integration/src/test/scala/akka/persistence/jdbc/integration/EventsByTagMigrationTest.scala similarity index 100% rename from core/src/it/scala/akka/persistence/jdbc/integration/EventsByTagMigrationTest.scala rename to integration/src/test/scala/akka/persistence/jdbc/integration/EventsByTagMigrationTest.scala diff --git a/core/src/it/scala/akka/persistence/jdbc/integration/EventsByTagTest.scala b/integration/src/test/scala/akka/persistence/jdbc/integration/EventsByTagTest.scala similarity index 100% rename from core/src/it/scala/akka/persistence/jdbc/integration/EventsByTagTest.scala rename to integration/src/test/scala/akka/persistence/jdbc/integration/EventsByTagTest.scala diff --git a/core/src/it/scala/akka/persistence/jdbc/integration/HardDeleteQueryTest.scala b/integration/src/test/scala/akka/persistence/jdbc/integration/HardDeleteQueryTest.scala similarity index 100% rename from core/src/it/scala/akka/persistence/jdbc/integration/HardDeleteQueryTest.scala rename to integration/src/test/scala/akka/persistence/jdbc/integration/HardDeleteQueryTest.scala diff --git a/core/src/it/scala/akka/persistence/jdbc/integration/JdbcJournalPerfSpec.scala b/integration/src/test/scala/akka/persistence/jdbc/integration/JdbcJournalPerfSpec.scala similarity index 100% rename from core/src/it/scala/akka/persistence/jdbc/integration/JdbcJournalPerfSpec.scala rename to integration/src/test/scala/akka/persistence/jdbc/integration/JdbcJournalPerfSpec.scala diff --git a/core/src/it/scala/akka/persistence/jdbc/integration/JdbcJournalSpec.scala b/integration/src/test/scala/akka/persistence/jdbc/integration/JdbcJournalSpec.scala similarity index 100% rename from core/src/it/scala/akka/persistence/jdbc/integration/JdbcJournalSpec.scala rename to integration/src/test/scala/akka/persistence/jdbc/integration/JdbcJournalSpec.scala diff --git a/core/src/it/scala/akka/persistence/jdbc/integration/JdbcSnapshotStoreSpec.scala b/integration/src/test/scala/akka/persistence/jdbc/integration/JdbcSnapshotStoreSpec.scala similarity index 100% rename from core/src/it/scala/akka/persistence/jdbc/integration/JdbcSnapshotStoreSpec.scala rename to integration/src/test/scala/akka/persistence/jdbc/integration/JdbcSnapshotStoreSpec.scala diff --git a/core/src/it/scala/akka/persistence/jdbc/integration/JournalDaoStreamMessagesMemoryTest.scala b/integration/src/test/scala/akka/persistence/jdbc/integration/JournalDaoStreamMessagesMemoryTest.scala similarity index 100% rename from core/src/it/scala/akka/persistence/jdbc/integration/JournalDaoStreamMessagesMemoryTest.scala rename to integration/src/test/scala/akka/persistence/jdbc/integration/JournalDaoStreamMessagesMemoryTest.scala diff --git a/core/src/it/scala/akka/persistence/jdbc/integration/JournalSequenceActorTest.scala b/integration/src/test/scala/akka/persistence/jdbc/integration/JournalSequenceActorTest.scala similarity index 100% rename from core/src/it/scala/akka/persistence/jdbc/integration/JournalSequenceActorTest.scala rename to integration/src/test/scala/akka/persistence/jdbc/integration/JournalSequenceActorTest.scala diff --git a/core/src/it/scala/akka/persistence/jdbc/integration/PostgresDurableStateStorePluginSpec.scala b/integration/src/test/scala/akka/persistence/jdbc/integration/PostgresDurableStateStorePluginSpec.scala similarity index 100% rename from core/src/it/scala/akka/persistence/jdbc/integration/PostgresDurableStateStorePluginSpec.scala rename to integration/src/test/scala/akka/persistence/jdbc/integration/PostgresDurableStateStorePluginSpec.scala diff --git a/core/src/it/scala/akka/persistence/jdbc/integration/PostgresScalaJdbcDurableStateChangesByTagTest.scala b/integration/src/test/scala/akka/persistence/jdbc/integration/PostgresScalaJdbcDurableStateChangesByTagTest.scala similarity index 100% rename from core/src/it/scala/akka/persistence/jdbc/integration/PostgresScalaJdbcDurableStateChangesByTagTest.scala rename to integration/src/test/scala/akka/persistence/jdbc/integration/PostgresScalaJdbcDurableStateChangesByTagTest.scala diff --git a/core/src/it/scala/akka/persistence/jdbc/integration/StoreOnlySerializableMessagesTest.scala b/integration/src/test/scala/akka/persistence/jdbc/integration/StoreOnlySerializableMessagesTest.scala similarity index 100% rename from core/src/it/scala/akka/persistence/jdbc/integration/StoreOnlySerializableMessagesTest.scala rename to integration/src/test/scala/akka/persistence/jdbc/integration/StoreOnlySerializableMessagesTest.scala diff --git a/migrator/src/it/scala/akka/persistence/jdbc/migrator/integration/JournalMigratorTest.scala b/migrator-integration/src/test/scala/akka/persistence/jdbc/migrator/integration/JournalMigratorTest.scala similarity index 100% rename from migrator/src/it/scala/akka/persistence/jdbc/migrator/integration/JournalMigratorTest.scala rename to migrator-integration/src/test/scala/akka/persistence/jdbc/migrator/integration/JournalMigratorTest.scala diff --git a/migrator/src/it/scala/akka/persistence/jdbc/migrator/integration/SnapshotMigratorTest.scala b/migrator-integration/src/test/scala/akka/persistence/jdbc/migrator/integration/SnapshotMigratorTest.scala similarity index 100% rename from migrator/src/it/scala/akka/persistence/jdbc/migrator/integration/SnapshotMigratorTest.scala rename to migrator-integration/src/test/scala/akka/persistence/jdbc/migrator/integration/SnapshotMigratorTest.scala diff --git a/project/IntegrationTests.scala b/project/IntegrationTests.scala new file mode 100644 index 000000000..5816a8a3f --- /dev/null +++ b/project/IntegrationTests.scala @@ -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) + +}