Skip to content

Commit

Permalink
Enable Junit reports for Scalatest (#3756)
Browse files Browse the repository at this point in the history
Changelog
- enable graphical test results for Scalatest tests like we have for [stdlib tests](https://github.com/enso-org/enso/actions/runs/3180677675/jobs/5184855484)

# Important Notes
Sometimes the report is created on a different workflow, like [here](https://github.com/enso-org/enso/actions/runs/3196147595/jobs/5217691808). Turned out it is a [known](dorny/test-reporter#67) issue in GitHub Actions https://github.com/orgs/community/discussions/24616
  • Loading branch information
4e6 committed Oct 7, 2022
1 parent 55f9e96 commit f168cd0
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 6 deletions.
30 changes: 27 additions & 3 deletions .github/workflows/scala-new.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,15 @@ jobs:
if: success() || failure()
with:
name: Enso Standard Library Tests (linux)
path: ${{ env.ENSO_TEST_JUNIT_DIR }}/**/*.xml
path: ${{ env.ENSO_TEST_JUNIT_DIR }}/*/*.xml
path-replace-backslashes: "true"
reporter: java-junit
- name: Engine test report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: Engine Tests (linux)
path: ${{ env.ENSO_TEST_JUNIT_DIR }}/*.xml
path-replace-backslashes: "true"
reporter: java-junit
enso-build-cli-ci-gen-job-ci-check-backend-macos:
Expand Down Expand Up @@ -146,7 +154,15 @@ jobs:
if: success() || failure()
with:
name: Enso Standard Library Tests (macos)
path: ${{ env.ENSO_TEST_JUNIT_DIR }}/**/*.xml
path: ${{ env.ENSO_TEST_JUNIT_DIR }}/*/*.xml
path-replace-backslashes: "true"
reporter: java-junit
- name: Engine test report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: Engine Tests (macos)
path: ${{ env.ENSO_TEST_JUNIT_DIR }}/*.xml
path-replace-backslashes: "true"
reporter: java-junit
enso-build-cli-ci-gen-job-ci-check-backend-windows:
Expand Down Expand Up @@ -214,7 +230,15 @@ jobs:
if: success() || failure()
with:
name: Enso Standard Library Tests (windows)
path: ${{ env.ENSO_TEST_JUNIT_DIR }}/**/*.xml
path: ${{ env.ENSO_TEST_JUNIT_DIR }}/*/*.xml
path-replace-backslashes: "true"
reporter: java-junit
- name: Engine test report
uses: dorny/test-reporter@v1
if: success() || failure()
with:
name: Engine Tests (windows)
path: ${{ env.ENSO_TEST_JUNIT_DIR }}/*.xml
path-replace-backslashes: "true"
reporter: java-junit
env:
Expand Down
10 changes: 7 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -210,9 +210,13 @@ ThisBuild / scalacOptions ++= Seq(
"-Ywarn-unused:privates" // Warn if a private member is unused.
)

ThisBuild / Test / testOptions += Tests.Argument(
"-oI"
)
ThisBuild / Test / testOptions ++=
Seq(Tests.Argument("-oI")) ++
sys.env
.get("ENSO_TEST_JUNIT_DIR")
.map { junitDir =>
Tests.Argument(TestFrameworks.ScalaTest, "-u", junitDir)
}

val jsSettings = Seq(
scalaJSLinkerConfig ~= { _.withModuleKind(ModuleKind.ESModule) }
Expand Down

0 comments on commit f168cd0

Please sign in to comment.