Skip to content

[DONT MERGE] CI will fail due to code format #191

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

Closed
wants to merge 8 commits into from
Closed
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ jobs:
if: ${{ always() }}
with:
check_name: ScalaTest Report (Java ${{ matrix.java }})
report_paths: 'target/**test-reports/TEST-*.xml'
report_paths: '**/target/**test-reports/TEST-*.xml'
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Check the test coverage is above the minimum criteria
run: sbt coverageAggregate
run: sbt core/coverageReport

# https://www.scala-sbt.org/1.x/docs/GitHub-Actions-with-sbt.html#Caching
- name: Clean files for caching
Expand Down
18 changes: 5 additions & 13 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ sbt multi-jvm:test
```

If we want to dig in failed test cases in integration tests,
we can look at integration test reports `target/multi-jvm-test-reports/*.xml` using [xunit-viewer](https://www.npmjs.com/package/xunit-viewer).
we can look at integration test reports `**/target/multi-jvm-test-reports/*.xml` using [xunit-viewer](https://www.npmjs.com/package/xunit-viewer).

Tips: Integration tests is not stable for now.

Expand All @@ -39,22 +39,14 @@ A test coverage is generated in the directory `target/scala-2.13/scoverage-repor

## Build Scaladoc
```shell
sbt doc
sbt unidoc
```

A Scaladoc is generated in the directory `target/scala-2.13/api`.
Scaladoc is generated in the directory `target/scala-2.13/unidoc`.

## Publish GitHub Pages
## Preview GitHub Pages

We publish a Scaladoc to GitHub Pages using `sbt-site` and `sbt-ghpages`.

To preview generated web pages, run the below command.
To preview generated GitHub Pages, run the below command.
```shell
sbt previewSite
```

To publish the pages, run the below command.
You should have proper permission to publish.
```shell
sbt ghpagesPushSite
```
11 changes: 10 additions & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,16 @@ Check the release is available at [Maven Central Repository](https://repo1.maven
- The release will be available about 10 minutes after publishing.
- It requires more time to be able to find the release with searching (about 2 hours max).

## 7. Create a new release `vX.Y.Z`
## 7. Publish GitHub Pages

Publish GitHub Pages using `sbt-site` and `sbt-ghpages`.
To publish the pages, checkout the new version tag `vX.Y.Z` and then run the below command.
Note that you should have proper permission to publish.
```shell
sbt ghpagesPushSite
```

## 8. Create a new release `vX.Y.Z`

Create a new release `vX.Y.Z` from [this link](https://github.com/lerna-stack/akka-entity-replication/releases/new).

Expand Down
62 changes: 38 additions & 24 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,48 @@ resolvers += "dnvriend" at "https://dl.bintray.com/dnvriend/maven"

lazy val akkaVersion = "2.6.17"

lazy val lerna = (project in file("."))
ThisBuild / scalaVersion := "2.13.4"
ThisBuild / scalacOptions ++= Seq(
"-feature",
"-unchecked",
"-Xlint",
"-Yrangepos",
"-Ywarn-unused:imports",
)
ThisBuild / scalacOptions ++= sys.props.get("lerna.enable.discipline").map(_ => "-Xfatal-warnings").toSeq
ThisBuild / scalafixScalaBinaryVersion := CrossVersion.binaryScalaVersion(scalaVersion.value)
// https://scalacenter.github.io/scalafix/docs/users/installation.html#sbt
ThisBuild / semanticdbEnabled := true
ThisBuild / semanticdbVersion := scalafixSemanticdb.revision
// doc
ThisBuild / Compile / doc / autoAPIMappings := true
ThisBuild / git.remoteRepo := "git@github.com:lerna-stack/akka-entity-replication.git"

lazy val root = project
.in(file("."))
.enablePlugins(
MultiJvmPlugin,
SiteScaladocPlugin,
ScalaUnidocPlugin,
GhpagesPlugin,
)
.configs(MultiJvm)
.aggregate(core)
.settings(
name := "akka-entity-replication-root",
publish / skip := true,
mimaFailOnNoPrevious := false,
ScalaUnidoc / siteSubdirName := "latest/api",
addMappingsToSiteDir(ScalaUnidoc / packageDoc / mappings, ScalaUnidoc / siteSubdirName),
previewSite / aggregate := false,
ghpagesPushSite / aggregate := false,
)

lazy val core = (project in file("core"))
.enablePlugins(
MultiJvmPlugin,
)
.configs(MultiJvm)
.settings(
inThisBuild(
List(
scalaVersion := "2.13.4",
scalacOptions ++= Seq(
"-feature",
"-unchecked",
"-Xlint",
"-Yrangepos",
"-Ywarn-unused:imports",
),
scalacOptions ++= sys.props.get("lerna.enable.discipline").map(_ => "-Xfatal-warnings").toSeq,
scalafixScalaBinaryVersion := CrossVersion.binaryScalaVersion(scalaVersion.value),
// https://scalacenter.github.io/scalafix/docs/users/installation.html#sbt
semanticdbEnabled := true,
semanticdbVersion := scalafixSemanticdb.revision,
),
),
name := "akka-entity-replication",
fork in Test := true,
parallelExecution in Test := false,
Expand Down Expand Up @@ -64,13 +81,10 @@ lazy val lerna = (project in file("."))
++ Seq(
scalatestOptions ++= Seq(
"-u",
"target/multi-jvm-test-reports",
(target.value / "multi-jvm-test-reports").getPath,
),
),
),
// doc
Compile / doc / autoAPIMappings := true,
git.remoteRepo := "git@github.com:lerna-stack/akka-entity-replication.git",
// test-coverage
coverageMinimum := 80,
coverageFailOnMinimum := true,
Expand Down Expand Up @@ -107,6 +121,6 @@ addCommandAlias(
"coverage",
"test",
"multi-jvm:test",
"coverageReport",
"coverageAggregate",
).mkString(";"),
)
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ClusterReplication private (system: ExtendedActorSystem) extends Extension
import ClusterReplication._

private[this] lazy val guardian: ActorRef =
system.systemActorOf(ClusterReplicationGuardian.props(), "clusterReplicationGuardian")
system.systemActorOf(ClusterReplicationGuardian.props(), "clusterReplicationGuardian")

@deprecated(message = "Use typed.ClusterReplication.init() instead", since = "2.0.0")
def start(
Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.25")

addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")

addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3")

addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.4.1")

addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.3")
Expand Down