Skip to content

Commit

Permalink
Use built-in codecov action
Browse files Browse the repository at this point in the history
  • Loading branch information
hamnis committed Oct 28, 2024
1 parent c2e5af6 commit 6391628
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 27 deletions.
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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}}
25 changes: 3 additions & 22 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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"))
Expand Down
3 changes: 1 addition & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -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")

0 comments on commit 6391628

Please sign in to comment.