Skip to content

Commit

Permalink
Add test summary to CI (#27648)
Browse files Browse the repository at this point in the history
Updated our test config to output test summary files. Added a step to the `build` workflow in GitHub actions to read from these files and output a summary in the GitHub UI.
  • Loading branch information
JamieB-gu authored Dec 9, 2024
1 parent 8b7f135 commit 59a82e0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ jobs:
-DAPP_SECRET="fake_secret" \
-Duser.timezone=Australia/Sydney \
-jar ./bin/sbt-launch.jar clean compile assets scalafmtCheckAll test Universal/packageBin
- name: Test Summary
uses: test-summary/action@v2
with:
paths: "test-results/**/TEST-*.xml"
if: always()

- uses: guardian/actions-riff-raff@v4
env:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,4 @@ static/src/stylesheets/pasteup/.npmrc
metals.sbt

.java-version
test-results/
3 changes: 1 addition & 2 deletions project/ProjectSettings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ object ProjectSettings {
def testStage = if (isCi) "DEVINFRA" else "LOCALTEST"

val frontendTestSettings = Seq(
// Use ScalaTest https://groups.google.com/d/topic/play-framework/rZBfNoGtC0M/discussion
Test / testOptions := Nil,
Test / testOptions += Tests.Argument(TestFrameworks.ScalaTest, "-u", s"test-results/scala-${scalaVersion.value}", "-o"),
concurrentRestrictions in Global := List(Tags.limit(Tags.Test, 4)),
// Copy unit test resources https://groups.google.com/d/topic/play-framework/XD3X6R-s5Mc/discussion
Test / unmanagedClasspath += (baseDirectory map { bd => Attributed.blank(bd / "test") }).value,
Expand Down

0 comments on commit 59a82e0

Please sign in to comment.