From 6391628f47864b38c4aefd270a10db60b9f4acc9 Mon Sep 17 00:00:00 2001 From: Erlend Hamnaberg Date: Mon, 28 Oct 2024 17:12:42 +0100 Subject: [PATCH] Use built-in codecov action --- .github/workflows/ci.yml | 9 ++++++--- build.sbt | 25 +++---------------------- project/plugins.sbt | 3 +-- 3 files changed, 10 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index decffa14..644d4acc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -302,10 +302,13 @@ jobs: strategy: matrix: os: [ubuntu-latest] - scala: [2.13.14] + scala: [2.12, 2.13] java: [temurin@11] runs-on: ${{ matrix.os }} steps: + - name: Install sbt + uses: sbt/setup-sbt@v1 + - name: Checkout current branch (fast) uses: actions/checkout@v4 @@ -324,6 +327,6 @@ jobs: - run: sbt '++ ${{ matrix.scala }}' coverage rootJVM/test coverageAggregate - - uses: codecov/codecov-action@v4 + - uses: codecov/codecov-action@v3 with: - flags: ${{matrix.scala}},${{matrix.java}} + flags: ${{matrix.scala}} diff --git a/build.sbt b/build.sbt index 684aba8f..d56c0e2c 100644 --- a/build.sbt +++ b/build.sbt @@ -22,28 +22,7 @@ ThisBuild / githubWorkflowJavaVersions := Seq("8", "17").map(JavaSpec.temurin) ThisBuild / tlCiScalafmtCheck := true -ThisBuild / githubWorkflowAddedJobs ++= Seq( - WorkflowJob( - id = "coverage", - name = "Generate coverage report", - scalas = List(Scala213V), - steps = List(WorkflowStep.Checkout) ++ WorkflowStep.SetupJava( - List(githubWorkflowJavaVersions.value.last) - ) ++ githubWorkflowGeneratedCacheSteps.value ++ List( - WorkflowStep.Sbt(List("coverage", "rootJVM/test", "coverageAggregate")), - WorkflowStep.Use( - UseRef.Public( - "codecov", - "codecov-action", - "v4" - ), - params = Map( - "flags" -> List("${{matrix.scala}}", "${{matrix.java}}").mkString(",") - ) - ) - ) - ) -) +ThisBuild / circeRootOfCodeCoverage := Some("rootJVM") def do_configure(project: Project) = project.settings( Seq( @@ -56,6 +35,8 @@ def do_configure(project: Project) = project.settings( lazy val root = tlCrossRootProject.aggregate(genericExtras, benchmarks) + + lazy val genericExtras = crossProject(JSPlatform, JVMPlatform, NativePlatform) .crossType(CrossType.Pure) .in(file("generic-extras")) diff --git a/project/plugins.sbt b/project/plugins.sbt index 244a94dd..897f9915 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,5 +1,4 @@ -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.17.0") addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.5.5") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.1.0") addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.7") addSbtPlugin("io.circe" % "sbt-circe-org" % "0.4.5")