diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..2224e5e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,30 @@ +name: CI +on: + workflow_dispatch: + pull_request: + + # triggering CI default branch improves caching + # see https://docs.github.com/en/free-pro-team@latest/actions/guides/caching-dependencies-to-speed-up-workflows#restrictions-for-accessing-a-cache + push: + branches: + - main + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup JDK + uses: actions/setup-java@v4 + with: + distribution: corretto + java-version: 11 + cache: sbt + - name: Build and Test + run: sbt compile + - name: Test Summary + uses: test-summary/action@v2 + with: + paths: "test-results/**/TEST-*.xml" + if: always() \ No newline at end of file diff --git a/build.sbt b/build.sbt index 438d614..6cf24d9 100644 --- a/build.sbt +++ b/build.sbt @@ -17,6 +17,7 @@ val artifactProductionSettings = Seq( releaseCrossBuild := true, scalacOptions ++= Seq("-release:11"),// do we need these as well? - ("-feature", "-deprecation", "-unchecked", "-Xfatal-warnings") licenses := Seq(License.Apache2), + Test / testOptions += Tests.Argument(TestFrameworks.ScalaTest, "-u", s"test-results/scala-${scalaVersion.value}", "-o") ) lazy val root = (project in file("."))