Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the codecov as own step, not with default build #450

Merged
merged 1 commit into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -253,3 +253,34 @@ jobs:
uses: scalacenter/sbt-dependency-submission@v2
with:
configs-ignore: test scala-tool scala-doc-tool test-internal

coverage:
name: Generate coverage report
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.13, 2.12, 3]
java: [temurin@11]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (fast)
uses: actions/checkout@v4

- name: Setup Java (temurin@17)
id: setup-java-temurin-17
if: matrix.java == 'temurin@17'
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
cache: sbt

- name: sbt update
if: matrix.java == 'temurin@17' && steps.setup-java-temurin-17.outputs.cache-hit == 'false'
run: sbt +update

- run: sbt '++ ${{ matrix.scala }}' coverage root/test coverageAggregate

- uses: codecov/codecov-action@v3
with:
flags: ${{matrix.scala}}
3 changes: 1 addition & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ ThisBuild / tlCiScalafixCheck := false // TODO: Address these in a follow up PR
ThisBuild / tlFatalWarnings := false // TODO: fix by dropping 2.12
ThisBuild / tlCiReleaseTags := true
ThisBuild / tlCiReleaseBranches := Nil
ThisBuild / circeRootOfCodeCoverage := Some("root")

val circeVersion = "0.14.9"
val munitVersion = "1.0.0"
Expand All @@ -26,8 +27,6 @@ def priorTo2_13(scalaVersion: String): Boolean =
val baseSettings = Seq(
resolvers ++= Resolver.sonatypeOssRepos("releases"),
resolvers ++= Resolver.sonatypeOssRepos("snapshots"),
coverageHighlighting := true,
coverageEnabled := !tlIsScala3.value,
libraryDependencies ++= Seq(
"io.circe" %% "circe-core" % circeVersion,
"org.scala-lang.modules" %% "scala-collection-compat" % "2.12.0",
Expand Down
Loading