Skip to content

Commit

Permalink
Enable HTML test report (#897)
Browse files Browse the repository at this point in the history
* Enable HTML test report

Signed-off-by: Tomoyuki Morita <[email protected]>

* Extend heap memory

Signed-off-by: Tomoyuki Morita <[email protected]>

* Try extending memory for subproject

Signed-off-by: Tomoyuki Morita <[email protected]>

* Use env variable to extend heap size

Signed-off-by: Tomoyuki Morita <[email protected]>

* Add comment

Signed-off-by: Tomoyuki Morita <[email protected]>

* Scope library dependency to test

Signed-off-by: Tomoyuki Morita <[email protected]>

---------

Signed-off-by: Tomoyuki Morita <[email protected]>
  • Loading branch information
ykmr1224 authored Nov 13, 2024
1 parent 9d504ea commit 78f2fbe
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/test-and-build-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,16 @@ jobs:
- name: Style check
run: sbt scalafmtCheckAll

- name: Set SBT_OPTS
# Needed to extend the JVM memory size to avoid OutOfMemoryError for HTML test report
run: echo "SBT_OPTS=-Xmx2G" >> $GITHUB_ENV

- name: Integ Test
run: sbt integtest/integration

- name: Upload test report
if: always() # Ensures the artifact is saved even if tests fail
uses: actions/upload-artifact@v3
with:
name: test-reports
path: target/test-reports # Adjust this path if necessary
4 changes: 4 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,11 @@ lazy val commonSettings = Seq(
compileScalastyle := (Compile / scalastyle).toTask("").value,
Compile / compile := ((Compile / compile) dependsOn compileScalastyle).value,
testScalastyle := (Test / scalastyle).toTask("").value,
// Enable HTML report and output to separate folder per package
Test / testOptions += Tests.Argument(TestFrameworks.ScalaTest, "-h", s"target/test-reports/${name.value}"),
Test / test := ((Test / test) dependsOn testScalastyle).value,
// Needed for HTML report
libraryDependencies += "com.vladsch.flexmark" % "flexmark-all" % "0.64.8" % "test",
dependencyOverrides ++= Seq(
"com.fasterxml.jackson.core" % "jackson-core" % jacksonVersion,
"com.fasterxml.jackson.core" % "jackson-databind" % jacksonVersion
Expand Down

0 comments on commit 78f2fbe

Please sign in to comment.