Skip to content

Commit 8d412b2

Browse files
Merge pull request #472 from codacy/feature/setup-coverage-cov-185
feature: coverage setup cov-185
2 parents 1792846 + 95429fc commit 8d412b2

2 files changed

Lines changed: 32 additions & 0 deletions

File tree

.circleci/config.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,36 @@ workflows:
150150
cmd: sbt coverage +test:compile
151151
cache_prefix: *cache_prefix
152152
persist_to_workspace: true
153+
steps_before_sbt:
154+
- run:
155+
name: Enable coverage
156+
command: echo "ThisBuild / coverageEnabled := true" > coverage.sbt
157+
steps:
158+
- run:
159+
name: Check formatting Sbt files
160+
command: sbt scalafmtSbtCheck
161+
- run:
162+
name: Check formatting Scala files
163+
command: sbt scalafmtCheckAll
164+
- run:
165+
name: Test compile
166+
command: sbt test:compile
167+
- run:
168+
name: It compile
169+
command: sbt it:compile
170+
- run:
171+
name: Unit testing
172+
command: sbt test
173+
- run:
174+
name: Aggregate coverage reports
175+
command: sbt coverageAggregate
176+
- run:
177+
name: Send coverage report to Codacy
178+
command: |
179+
bash <(curl -Ls https://coverage.codacy.com/get.sh)
180+
- run:
181+
name: Clean coverage.sbt from cache
182+
command: rm coverage.sbt
153183
requires:
154184
- codacy/checkout_and_version
155185
- codacy/sbt:

project/plugins.sbt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@ addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.15.0")
1414
addSbtPlugin("com.twilio" % "sbt-guardrail" % "0.59.0")
1515

1616
ThisBuild / libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always
17+
18+
evictionErrorLevel := Level.Warn

0 commit comments

Comments
 (0)