From 3a76aa1ad28f155235c04dd679e7cee3c2c27733 Mon Sep 17 00:00:00 2001 From: Ignasi Marimon-Clos Date: Mon, 2 Aug 2021 19:27:03 +0200 Subject: [PATCH 1/3] Migrate PRValidation to GHActions * Set sbtopts inline * Ignore flaky, obsolete test * Adds concurrency limit (run only latest commit * Don't run scala3 workflows until ready to merge * split publishLocal from pr validation --- .github/workflows/build-test-prValidation.yml | 120 ++++++++++++++++++ .github/workflows/scala3-build.yml | 3 +- .../scala/akka/routing/BalancingSpec.scala | 15 ++- .../delivery/ConsumerControllerSpec.scala | 3 +- .../typed/delivery/DurableShardingSpec.scala | 5 +- .../cluster/sharding/StartEntitySpec.scala | 5 +- .../ClusterDeathWatchNotificationSpec.scala | 3 +- .../fsm/AbstractPersistentFSMTest.java | 4 + project/CopyrightHeaderForBoilerplate.scala | 2 +- project/Dependencies.scala | 18 +-- project/Doc.scala | 40 +++--- project/MultiNode.scala | 2 +- 12 files changed, 176 insertions(+), 44 deletions(-) create mode 100644 .github/workflows/build-test-prValidation.yml diff --git a/.github/workflows/build-test-prValidation.yml b/.github/workflows/build-test-prValidation.yml new file mode 100644 index 0000000000..aceb8b713d --- /dev/null +++ b/.github/workflows/build-test-prValidation.yml @@ -0,0 +1,120 @@ +name: PRValidation Workflow + +on: + pull_request: + +concurrency: + # Only run once for latest commit per ref and cancel other (previous) runs. + group: ci-${{ github.ref }} + cancel-in-progress: true + +jobs: + check-code-style: + name: Checks + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + # we don't know what commit the last tag was it's safer to get entire repo so previousStableVersion resolves + fetch-depth: 0 + + - name: Set up JDK 8 + uses: olafurpg/setup-scala@v10 + with: + java-version: adopt@1.8.0 + + - name: Cache Coursier cache + uses: coursier/cache-action@v6.2 + +# ghtag "$ghprbPullId" akka akka '["validating"]' "tested needs-attention" + + - name: Code style check + run: |- + # MiMa is disabled in GHActions because it's already covered in Travis builds (travis runs for multiple scala versions) + sbt -jvm-opts .jvmopts-ci \ + -Dakka.mima.enabled=false \ + -Dakka.ci-server=true \ + -Dakka.test.multi-in-test=false \ + -Dakka.test.multi-node=false \ + -Dakka.cluster.assert=on \ + -Dsbt.override.build.repos=false \ + -Dsbt.log.noformat=false \ + -Dakka.log.timestamps=true \ + scalafmtCheckAll scalafmtSbtCheck test:compile + + Check-Publish: + name: PR Validation + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + # we don't know what commit the last tag was it's safer to get entire repo so previousStableVersion resolves + fetch-depth: 0 + + - name: Set up JDK 8 + uses: olafurpg/setup-scala@v10 + with: + java-version: adopt@1.8.0 + + - name: Cache Coursier cache + uses: coursier/cache-action@v6.2 + + - name: Akka publishLocal + run: |- + sbt -jvm-opts .jvmopts-ci \ + -Dakka.mima.enabled=false \ + -Dakka.ci-server=true \ + -Dakka.test.tags.exclude=performance,timing,long-running,gh-exclude \ + -Dakka.test.multi-in-test=false \ + -Dakka.test.timefactor=1 \ + -Dakka.cluster.assert=on \ + -Dsbt.override.build.repos=false \ + -Dakka.test.multi-node=false \ + -Dsbt.log.noformat=false \ + -Dakka.log.timestamps=true \ + publishLocal publishM2 + + + PR-Validation: + name: PR Validation + runs-on: ubuntu-20.04 + strategy: + matrix: + project: [akka-actor,akka-actor-testkit-typed,akka-actor-typed,akka-cluster,akka-cluster-metrics,akka-cluster-sharding,akka-cluster-sharding-typed,akka-cluster-tools,akka-cluster-typed,akka-coordination,akka-discovery,akka-distributed-data,akka-serialization-jackson,akka-multi-node-testkit,akka-osgi,akka-persistence,akka-persistence-query,akka-persistence-typed,akka-persistence-testkit,akka-protobuf,akka-protobuf-v3,akka-pki,akka-remote,akka-slf4j,akka-stream,akka-stream-testkit,akka-stream-typed,akka-testkit,akka-actor-tests,akka-actor-typed-tests,akka-docs,akka-bill-of-materials,akka-persistence-shared,akka-persistence-tck,akka-persistence-typed-tests,akka-remote-tests,akka-stream-tests,akka-stream-tests-tck] + fail-fast: false + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + # we don't know what commit the last tag was it's safer to get entire repo so previousStableVersion resolves + fetch-depth: 0 + + - name: Set up JDK 8 + uses: olafurpg/setup-scala@v10 + with: + java-version: adopt@1.8.0 + + - name: Cache Coursier cache + uses: coursier/cache-action@v6.2 + + - name: Akka validatePR + run: |- + sbt -jvm-opts .jvmopts-ci \ + -Dakka.mima.enabled=false \ + -Dakka.ci-server=true \ + -Dakka.test.tags.exclude=performance,timing,long-running,gh-exclude \ + -Dakka.test.multi-in-test=false \ + -Dakka.test.timefactor=1 \ + -Dakka.cluster.assert=on \ + -Dsbt.override.build.repos=false \ + -Dakka.test.multi-node=false \ + -Dsbt.log.noformat=false \ + -Dakka.log.timestamps=true \ + ${{ matrix.project }}/validatePullRequest + +## if success +# ghtag "$ghprbPullId" akka akka '["tested"]' "validating needs-attention" +## if aborted or unstable +# ghtag "$ghprbPullId" akka akka '["needs-attention"]' "tested validating" diff --git a/.github/workflows/scala3-build.yml b/.github/workflows/scala3-build.yml index 77c016e627..ca27c64312 100644 --- a/.github/workflows/scala3-build.yml +++ b/.github/workflows/scala3-build.yml @@ -1,7 +1,8 @@ name: Build Akka with Scala 3 on: - pull_request: + # TODO: uncomment this before merging! + # pull_request: push: branches: - master diff --git a/akka-actor-tests/src/test/scala/akka/routing/BalancingSpec.scala b/akka-actor-tests/src/test/scala/akka/routing/BalancingSpec.scala index 9b994082c1..d86666ab00 100644 --- a/akka-actor-tests/src/test/scala/akka/routing/BalancingSpec.scala +++ b/akka-actor-tests/src/test/scala/akka/routing/BalancingSpec.scala @@ -10,11 +10,14 @@ import java.util.concurrent.atomic.AtomicInteger import scala.concurrent.Await import scala.concurrent.duration._ -import org.scalatest.BeforeAndAfterEach - -import akka.actor.{ Actor, Props } import akka.actor.ActorRef -import akka.testkit.{ AkkaSpec, ImplicitSender, TestLatch } +import akka.actor.Actor +import akka.actor.Props +import akka.testkit.AkkaSpec +import akka.testkit.GHExcludeTest +import akka.testkit.ImplicitSender +import akka.testkit.TestLatch +import org.scalatest.BeforeAndAfterEach object BalancingSpec { val counter = new AtomicInteger(1) @@ -106,14 +109,14 @@ class BalancingSpec extends AkkaSpec(""" test(pool, latch) } - "deliver messages in a balancing fashion when defined in config" in { + "deliver messages in a balancing fashion when defined in config" taggedAs GHExcludeTest in { val latch = TestLatch(poolSize) val pool = system.actorOf(FromConfig().props(routeeProps = Props(classOf[Worker], latch)), name = "balancingPool-2") test(pool, latch) } - "deliver messages in a balancing fashion when overridden in config" in { + "deliver messages in a balancing fashion when overridden in config" taggedAs GHExcludeTest in { val latch = TestLatch(poolSize) val pool = system.actorOf(BalancingPool(1).props(routeeProps = Props(classOf[Worker], latch)), name = "balancingPool-3") diff --git a/akka-actor-typed-tests/src/test/scala/akka/actor/typed/delivery/ConsumerControllerSpec.scala b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/delivery/ConsumerControllerSpec.scala index ff2645ef4c..5afcc226d0 100644 --- a/akka-actor-typed-tests/src/test/scala/akka/actor/typed/delivery/ConsumerControllerSpec.scala +++ b/akka-actor-typed-tests/src/test/scala/akka/actor/typed/delivery/ConsumerControllerSpec.scala @@ -8,7 +8,6 @@ import scala.concurrent.duration._ import com.typesafe.config.ConfigFactory import org.scalatest.wordspec.AnyWordSpecLike - import akka.actor.testkit.typed.scaladsl.LogCapturing import akka.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit import akka.actor.typed.delivery.ConsumerController.DeliverThenStop @@ -474,7 +473,7 @@ class ConsumerControllerSpec testKit.stop(consumerController) } - // Excluded in GH Actions: https://github.com/akka/akka/issues/30430 + // Excluded fo GHActions. See https://github.com/akka/akka/issues/30430 "send Ack when stopped" taggedAs GHExcludeTest in { nextId() val consumerController = diff --git a/akka-cluster-sharding-typed/src/test/scala/akka/cluster/sharding/typed/delivery/DurableShardingSpec.scala b/akka-cluster-sharding-typed/src/test/scala/akka/cluster/sharding/typed/delivery/DurableShardingSpec.scala index bd629442fc..2862af1835 100644 --- a/akka-cluster-sharding-typed/src/test/scala/akka/cluster/sharding/typed/delivery/DurableShardingSpec.scala +++ b/akka-cluster-sharding-typed/src/test/scala/akka/cluster/sharding/typed/delivery/DurableShardingSpec.scala @@ -9,7 +9,6 @@ import java.util.UUID import com.typesafe.config.Config import com.typesafe.config.ConfigFactory import org.scalatest.wordspec.AnyWordSpecLike - import akka.Done import akka.actor.testkit.typed.scaladsl.LogCapturing import akka.actor.testkit.typed.scaladsl.ScalaTestWithActorTestKit @@ -30,6 +29,7 @@ import akka.cluster.typed.Join import akka.persistence.journal.inmem.InmemJournal import akka.persistence.typed.PersistenceId import akka.persistence.typed.delivery.EventSourcedProducerQueue +import akka.testkit.GHExcludeTest object DurableShardingSpec { def conf: Config = @@ -81,7 +81,8 @@ class DurableShardingSpec Cluster(system).manager ! Join(Cluster(system).selfMember.address) } - "load initial state and resend unconfirmed" in { + // GHExclude tracked in https://github.com/akka/akka/issues/30489 + "load initial state and resend unconfirmed" taggedAs GHExcludeTest in { nextId() val typeKey = EntityTypeKey[SequencedMessage[TestConsumer.Job]](s"TestConsumer-$idCount") val consumerProbe = createTestProbe[TestConsumer.JobDelivery]() diff --git a/akka-cluster-sharding/src/test/scala/akka/cluster/sharding/StartEntitySpec.scala b/akka-cluster-sharding/src/test/scala/akka/cluster/sharding/StartEntitySpec.scala index 7c01ab2872..3135a64205 100644 --- a/akka-cluster-sharding/src/test/scala/akka/cluster/sharding/StartEntitySpec.scala +++ b/akka-cluster-sharding/src/test/scala/akka/cluster/sharding/StartEntitySpec.scala @@ -13,9 +13,10 @@ import akka.testkit.AkkaSpec import akka.testkit.ImplicitSender import akka.testkit.WithLogCapturing import com.typesafe.config.ConfigFactory - import scala.concurrent.duration._ +import akka.testkit.GHExcludeTest + /** * Covers some corner cases around sending triggering an entity with StartEntity */ @@ -118,7 +119,7 @@ class StartEntitySpec extends AkkaSpec(StartEntitySpec.config) with ImplicitSend // entity crashed and before restart-backoff hit we sent it a StartEntity "StartEntity while the entity is waiting for restart" should { - "restart it immediately" in { + "restart it immediately" taggedAs GHExcludeTest in { val sharding = ClusterSharding(system).start( "start-entity-2", EntityActor.props(), diff --git a/akka-cluster/src/test/scala/akka/cluster/ClusterDeathWatchNotificationSpec.scala b/akka-cluster/src/test/scala/akka/cluster/ClusterDeathWatchNotificationSpec.scala index a4081256cc..553834995a 100644 --- a/akka-cluster/src/test/scala/akka/cluster/ClusterDeathWatchNotificationSpec.scala +++ b/akka-cluster/src/test/scala/akka/cluster/ClusterDeathWatchNotificationSpec.scala @@ -81,7 +81,8 @@ class ClusterDeathWatchNotificationSpec } } - "receive Terminated after ordinary messages" in { + // https://github.com/akka/akka/issues/30135 + "receive Terminated after ordinary messages" taggedAs GHExcludeTest in { val receiverProbe = TestProbe() setupSender(system2, receiverProbe, "sender") val sender = identifySender(system2, "sender") diff --git a/akka-persistence/src/test/java/akka/persistence/fsm/AbstractPersistentFSMTest.java b/akka-persistence/src/test/java/akka/persistence/fsm/AbstractPersistentFSMTest.java index 4924e63b97..e2f4d6932c 100644 --- a/akka-persistence/src/test/java/akka/persistence/fsm/AbstractPersistentFSMTest.java +++ b/akka-persistence/src/test/java/akka/persistence/fsm/AbstractPersistentFSMTest.java @@ -19,6 +19,7 @@ import java.util.List; import java.util.UUID; import java.time.Duration; +import org.junit.Ignore; import org.junit.Test; import org.scalatestplus.junit.JUnitSuite; @@ -148,7 +149,10 @@ public class AbstractPersistentFSMTest extends JUnitSuite { }; } + // This test is flaky (https://github.com/akka/akka/issues/24723) and that failure issue was + // already deemed obsolete. Plus, the whole test is marked as deprecated. Ignoring... @Test + @Ignore public void testSuccessfulRecoveryWithCorrectStateData() { new TestKit(system) { { diff --git a/project/CopyrightHeaderForBoilerplate.scala b/project/CopyrightHeaderForBoilerplate.scala index d6a76995b1..03c859d473 100644 --- a/project/CopyrightHeaderForBoilerplate.scala +++ b/project/CopyrightHeaderForBoilerplate.scala @@ -18,7 +18,7 @@ object CopyrightHeaderForBoilerplate extends CopyrightHeader { Seq(Compile, Test).flatMap { config => inConfig(config) { Seq( - config / headerSources ++= + config / headerSources ++= (((config / sourceDirectory).value / "boilerplate") ** "*.template").get, headerMappings := headerMappings.value ++ Map(HeaderFileType("template") -> cStyleComment)) } diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 121e261a30..9315152b5d 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -300,15 +300,15 @@ object Dependencies { lz4Java, Test.junit, Test.scalatest) ++ - (if (getScalaVersion() == scala3Version) - // jackson-module-scala is only available for Scala 3 from 2.13.0 onwards. - // since we don't depend on it ourselves, but provide it as a transitive - // dependency for convenience, we can leave it out for Scala 3 for now, - // and depend on 2.13.0-rc1 for our tests. Eventually we should consider - // whether to update all jackson artifacts for Scala 3. - Seq("com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.13.0-rc1" % "test") - else - Seq(jacksonScala)) + (if (getScalaVersion() == scala3Version) + // jackson-module-scala is only available for Scala 3 from 2.13.0 onwards. + // since we don't depend on it ourselves, but provide it as a transitive + // dependency for convenience, we can leave it out for Scala 3 for now, + // and depend on 2.13.0-rc1 for our tests. Eventually we should consider + // whether to update all jackson artifacts for Scala 3. + Seq("com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.13.0-rc1" % "test") + else + Seq(jacksonScala)) val osgi = l ++= Seq( osgiCore, diff --git a/project/Doc.scala b/project/Doc.scala index 939faa33a8..8abdec4441 100644 --- a/project/Doc.scala +++ b/project/Doc.scala @@ -157,24 +157,23 @@ object UnidocRoot extends AutoPlugin { JavaUnidoc / unidocProjectFilter := unidocRootProjectFilter(unidocRootIgnoreProjects.value), ScalaUnidoc / apiMappings := (Compile / doc / apiMappings).value) ++ UnidocRoot.CliOptions.genjavadocEnabled - .ifTrue( - Seq( - JavaUnidoc / unidocAllSources ~= { v => - v.map(_.filterNot(s => - // akka.stream.scaladsl.GraphDSL.Implicits.ReversePortsOps - // contains code that genjavadoc turns into (probably - // incorrect) Java code that in turn confuses the javadoc - // tool. - s.getAbsolutePath.endsWith("scaladsl/GraphDSL.java") || - // Since adding -P:genjavadoc:strictVisibility=true, - // the javadoc tool would NullPointerException while - // determining the upper bound for some generics: - s.getAbsolutePath.endsWith("TopicImpl.java") || - s.getAbsolutePath.endsWith("PersistencePlugin.java") || - s.getAbsolutePath.endsWith("GraphDelegate.java") || - s.getAbsolutePath.contains("/impl/") - )) - })) + .ifTrue(Seq(JavaUnidoc / unidocAllSources ~= { v => + v.map( + _.filterNot( + s => + // akka.stream.scaladsl.GraphDSL.Implicits.ReversePortsOps + // contains code that genjavadoc turns into (probably + // incorrect) Java code that in turn confuses the javadoc + // tool. + s.getAbsolutePath.endsWith("scaladsl/GraphDSL.java") || + // Since adding -P:genjavadoc:strictVisibility=true, + // the javadoc tool would NullPointerException while + // determining the upper bound for some generics: + s.getAbsolutePath.endsWith("TopicImpl.java") || + s.getAbsolutePath.endsWith("PersistencePlugin.java") || + s.getAbsolutePath.endsWith("GraphDelegate.java") || + s.getAbsolutePath.contains("/impl/"))) + })) .getOrElse(Nil)) } } @@ -197,6 +196,9 @@ object BootstrapGenjavadoc extends AutoPlugin { override lazy val projectSettings = UnidocRoot.CliOptions.genjavadocEnabled .ifTrue(Seq( unidocGenjavadocVersion := "0.18", - Compile / scalacOptions ++= Seq("-P:genjavadoc:fabricateParams=false", "-P:genjavadoc:suppressSynthetic=false", "-P:genjavadoc:strictVisibility=true"))) + Compile / scalacOptions ++= Seq( + "-P:genjavadoc:fabricateParams=false", + "-P:genjavadoc:suppressSynthetic=false", + "-P:genjavadoc:strictVisibility=true"))) .getOrElse(Nil) } diff --git a/project/MultiNode.scala b/project/MultiNode.scala index fa3e7a72a4..0493cd6e93 100644 --- a/project/MultiNode.scala +++ b/project/MultiNode.scala @@ -74,7 +74,7 @@ object MultiNode extends AutoPlugin { MultiJvm / jvmOptions := defaultMultiJvmOptions, MultiJvm / scalacOptions := (Test / scalacOptions).value, multiJvmCreateLogger / logLevel := Level.Debug, // to see ssh establishment - MultiJvm / assembly / assemblyMergeStrategy := { + MultiJvm / assembly / assemblyMergeStrategy := { case n if n.endsWith("logback-test.xml") => MergeStrategy.first case n if n.toLowerCase.matches("meta-inf.*\\.default") => MergeStrategy.first case n => (MultiJvm / assembly / assemblyMergeStrategy).value.apply(n) From 0db77be97f8c75adec387f148d60f62792c9ed2c Mon Sep 17 00:00:00 2001 From: Ignasi Marimon-Clos Date: Mon, 2 Aug 2021 19:41:25 +0200 Subject: [PATCH 2/3] Add GH Actions JDKx nightly jobs * Use inline sbt args * Prefer ubuntu LTS * Link to tagging issue --- .github/workflows/build-test-prValidation.yml | 4 +- .github/workflows/nightly-jdk11.yml | 46 ++++++++++++++++ .github/workflows/nightly-jdk8-scala2.13.yml | 47 +++++++++++++++++ .github/workflows/nightly-jdk8.yml | 52 +++++++++++++++++++ 4 files changed, 148 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/nightly-jdk11.yml create mode 100644 .github/workflows/nightly-jdk8-scala2.13.yml create mode 100644 .github/workflows/nightly-jdk8.yml diff --git a/.github/workflows/build-test-prValidation.yml b/.github/workflows/build-test-prValidation.yml index aceb8b713d..a871d80938 100644 --- a/.github/workflows/build-test-prValidation.yml +++ b/.github/workflows/build-test-prValidation.yml @@ -27,6 +27,7 @@ jobs: - name: Cache Coursier cache uses: coursier/cache-action@v6.2 +## https://github.com/akka/akka/issues/30459 # ghtag "$ghprbPullId" akka akka '["validating"]' "tested needs-attention" - name: Code style check @@ -44,7 +45,7 @@ jobs: scalafmtCheckAll scalafmtSbtCheck test:compile Check-Publish: - name: PR Validation + name: Check publishing locally runs-on: ubuntu-20.04 steps: - name: Checkout @@ -114,6 +115,7 @@ jobs: -Dakka.log.timestamps=true \ ${{ matrix.project }}/validatePullRequest +## https://github.com/akka/akka/issues/30459 ## if success # ghtag "$ghprbPullId" akka akka '["tested"]' "validating needs-attention" ## if aborted or unstable diff --git a/.github/workflows/nightly-jdk11.yml b/.github/workflows/nightly-jdk11.yml new file mode 100644 index 0000000000..37147c19d0 --- /dev/null +++ b/.github/workflows/nightly-jdk11.yml @@ -0,0 +1,46 @@ +name: Nightly jkd11 + +on: + schedule: + - cron: '0 6 * * *' + +jobs: + compile-and-test: + name: Compile and test + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set up JDK 11 + uses: olafurpg/setup-scala@v10 + with: + java-version: adopt@1.11 + + - name: Cache Coursier cache + uses: coursier/cache-action@v6.2 + + - name: Compile and test for JDK11 + run: |- + sbt -jvm-opts .jvmopts-ci \ + -Dakka.test.timefactor=1 \ + -Dakka.genjavadoc.enabled=true \ + -Dakka.test.multi-in-test=false \ + clean test checkTestsHaveRun + + - name: Email on failure + if: ${{ failure() }} + uses: dawidd6/action-send-mail@v3 + with: + server_address: smtp.gmail.com + server_port: 465 + username: ${{secrets.MAIL_USERNAME}} + password: ${{secrets.MAIL_PASSWORD}} + subject: Nightly jkd11 Failed (Akka) + to: akka.official@gmail.com + from: Akka CI (GHActions) + body: | + Nightly jkd11 of ${{github.repository}} failed! + https://github.com/${{github.repository}}/actions/runs/${{github.run_id}} diff --git a/.github/workflows/nightly-jdk8-scala2.13.yml b/.github/workflows/nightly-jdk8-scala2.13.yml new file mode 100644 index 0000000000..8760932847 --- /dev/null +++ b/.github/workflows/nightly-jdk8-scala2.13.yml @@ -0,0 +1,47 @@ +name: Nightly jdk8/scala2.13 +on: + schedule: + - cron: '0 20 * * *' + +jobs: + compile-and-test: + name: Compile and test + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set up JDK 8 + uses: olafurpg/setup-scala@v10 + with: + java-version: adopt@1.8.0 + + - name: Cache Coursier cache + uses: coursier/cache-action@v6.2 + + - name: Compile and test for JDK8 (scala2.13) + run: |- + # TODO: restore -Dakka.test.multi-node.java=/usr/lib/jvm/jdk8u192-b12/bin/java + sbt -jvm-opts .jvmopts-ci \ + -Dakka.ci-server=true \ + -Dakka.build.scalaVersion=2.13.3 \ + -Dakka.test.timefactor=1 \ + -Dakka.cluster.assert=on \ + clean compile test doc + + - name: Email on failure + if: ${{ failure() }} + uses: dawidd6/action-send-mail@v3 + with: + server_address: smtp.gmail.com + server_port: 465 + username: ${{secrets.MAIL_USERNAME}} + password: ${{secrets.MAIL_PASSWORD}} + subject: Nightly jdk8/scala2.13 Failed (Akka) + to: akka.official@gmail.com + from: Akka CI (GHActions) + body: | + Nightly jdk8/scala2.13 of ${{github.repository}} failed! + https://github.com/${{github.repository}}/actions/runs/${{github.run_id}} diff --git a/.github/workflows/nightly-jdk8.yml b/.github/workflows/nightly-jdk8.yml new file mode 100644 index 0000000000..a6a2dd5eeb --- /dev/null +++ b/.github/workflows/nightly-jdk8.yml @@ -0,0 +1,52 @@ +name: Nightly jkd8 + +on: + schedule: + - cron: '0 4,21 * * *' + +jobs: + compile-and-test: + name: Compile and test + runs-on: ubuntu-20.04 + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Set up JDK 8 + uses: olafurpg/setup-scala@v10 + with: + java-version: adopt@$1.8.0 + + - name: Cache Coursier cache + uses: coursier/cache-action@v6.2 + + - name: Compile and test for JDK ${{ matrix.JABBA_JDK }}, Scala ${{ matrix.SCALA_VERSION }} + run: |- + ## TODO: restore the multi-node tests + sbt -jvm-opts .jvmopts-ci \ + -Dakka.ci-server=true \ + -Dakka.test.timefactor=1 \ + -Dakka.cluster.assert=on \ + -Dakka.test.metrics.reporters.0=console \ + -Dakka.test.metrics.reporters.1=graphit \ + -Dakka.test.metrics.reporter.graphite.prefix=jenkins \ + -Dakka.test.metrics.reporter.graphite.host=54.72.154.120 \ + -Dakka.sbt.statsd=false \ + clean update whitesourceUpdate whitesourceCheckPolicies test:compile test publishLocal publishM2 + + - name: Email on failure + if: ${{ failure() }} + uses: dawidd6/action-send-mail@v3 + with: + server_address: smtp.gmail.com + server_port: 465 + username: ${{secrets.MAIL_USERNAME}} + password: ${{secrets.MAIL_PASSWORD}} + subject: Nightly jdk8 Failed (Akka) + to: akka.official@gmail.com + from: Akka CI (GHActions) + body: | + Nightly jdk8 of ${{github.repository}} failed! + https://github.com/${{github.repository}}/actions/runs/${{github.run_id}} From 3c095074a9a851d2918c50537184eae2cfb7f35c Mon Sep 17 00:00:00 2001 From: Patrik Nordwall Date: Wed, 11 Aug 2021 11:44:46 +0200 Subject: [PATCH 3/3] Don't enable full pr validation yet --- .github/workflows/build-test-prValidation.yml | 10 ++++------ .github/workflows/scala3-build.yml | 3 +-- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-test-prValidation.yml b/.github/workflows/build-test-prValidation.yml index a871d80938..1deb8da360 100644 --- a/.github/workflows/build-test-prValidation.yml +++ b/.github/workflows/build-test-prValidation.yml @@ -33,6 +33,7 @@ jobs: - name: Code style check run: |- # MiMa is disabled in GHActions because it's already covered in Travis builds (travis runs for multiple scala versions) + # FIXME move MiMa checks to GHActions sbt -jvm-opts .jvmopts-ci \ -Dakka.mima.enabled=false \ -Dakka.ci-server=true \ @@ -42,7 +43,7 @@ jobs: -Dsbt.override.build.repos=false \ -Dsbt.log.noformat=false \ -Dakka.log.timestamps=true \ - scalafmtCheckAll scalafmtSbtCheck test:compile + scalafmtCheckAll scalafmtSbtCheck Check-Publish: name: Check publishing locally @@ -81,10 +82,6 @@ jobs: PR-Validation: name: PR Validation runs-on: ubuntu-20.04 - strategy: - matrix: - project: [akka-actor,akka-actor-testkit-typed,akka-actor-typed,akka-cluster,akka-cluster-metrics,akka-cluster-sharding,akka-cluster-sharding-typed,akka-cluster-tools,akka-cluster-typed,akka-coordination,akka-discovery,akka-distributed-data,akka-serialization-jackson,akka-multi-node-testkit,akka-osgi,akka-persistence,akka-persistence-query,akka-persistence-typed,akka-persistence-testkit,akka-protobuf,akka-protobuf-v3,akka-pki,akka-remote,akka-slf4j,akka-stream,akka-stream-testkit,akka-stream-typed,akka-testkit,akka-actor-tests,akka-actor-typed-tests,akka-docs,akka-bill-of-materials,akka-persistence-shared,akka-persistence-tck,akka-persistence-typed-tests,akka-remote-tests,akka-stream-tests,akka-stream-tests-tck] - fail-fast: false steps: - name: Checkout uses: actions/checkout@v2 @@ -101,6 +98,7 @@ jobs: uses: coursier/cache-action@v6.2 - name: Akka validatePR + # FIXME: Change this to validatePullRequest run: |- sbt -jvm-opts .jvmopts-ci \ -Dakka.mima.enabled=false \ @@ -113,7 +111,7 @@ jobs: -Dakka.test.multi-node=false \ -Dsbt.log.noformat=false \ -Dakka.log.timestamps=true \ - ${{ matrix.project }}/validatePullRequest + Test/compile ## https://github.com/akka/akka/issues/30459 ## if success diff --git a/.github/workflows/scala3-build.yml b/.github/workflows/scala3-build.yml index ca27c64312..77c016e627 100644 --- a/.github/workflows/scala3-build.yml +++ b/.github/workflows/scala3-build.yml @@ -1,8 +1,7 @@ name: Build Akka with Scala 3 on: - # TODO: uncomment this before merging! - # pull_request: + pull_request: push: branches: - master