diff --git a/.circleci/config.yml b/.circleci/config.yml index a711fb95..a5cf05b2 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,6 +1,9 @@ -# Scala CircleCI 2.0 configuration file +# Scala CircleCI 2.x configuration file # See: https://circleci.com/docs/2.0/sample-config/ -version: 2 +version: '2.1' + +orbs: + codecov: codecov/codecov@3.2.2 # Define a job to be invoked later in a workflow. # See: https://circleci.com/docs/2.0/configuration-reference/#jobs @@ -36,12 +39,14 @@ jobs: # fallback to using the latest cache if no exact match is found - v1-dependencies- - - run: cat /dev/null | sbt 'Test / compile' + # Compile, run tests, and produce coverage reports! + - run: exec 0<&- && sbt clean coverage test coverageReport coverageAggregate shutdown + # Save cached artifacts - save_cache: paths: - ~/.m2 key: v1-dependencies--{{ checksum "build.sbt" }} - # run tests! - - run: cat /dev/null | sbt test + # Upload the coverage reports codecov using the secure Orb + - codecov/upload diff --git a/codecov.yml b/codecov.yml index 13c95432..ac91be05 100644 --- a/codecov.yml +++ b/codecov.yml @@ -1,17 +1,15 @@ +codecov: + ci: + - "circleci.com" + coverage: + # TODO: Use better coverage configs after adding better unit test coverage status: patch: default: target: 50% threshold: 0% - branches: - - master - - prototype project: default: - # TODO: Use better coverage configs after adding better unit test coverage target: 50% threshold: 0% - branches: - - master - - prototype diff --git a/project/plugins.sbt b/project/plugins.sbt index d3f4660c..0351718a 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,5 +1,5 @@ addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.1.1") addSbtPlugin("org.jetbrains.scala" % "sbt-ide-settings" % "1.1.1") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6") -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.3") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.0-M4") addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.10")