Skip to content
Draft
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
52 changes: 18 additions & 34 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2.1

orbs:
codacy: codacy/base@10.11.0
codacy: codacy/base@12.0.0
slack: circleci/[email protected]

references:
Expand Down Expand Up @@ -146,27 +146,25 @@ workflows:
write_sbt_version: true
- codacy/sbt:
name: compile
install_sbt_version: 1.8.2
cmd: sbt coverage +test:compile
install_sbt_version: 1.10.0
cache_prefix: *cache_prefix
persist_to_workspace: true
steps:
- run:
name: Compile
command: sbt compile
requires:
- codacy/checkout_and_version
- codacy/sbt:
name: test
install_sbt_version: 1.10.0
cache_prefix: *cache_prefix
persist_to_workspace: true
steps_before_sbt:
- run:
name: Enable coverage
command: echo "ThisBuild / coverageEnabled := true" > coverage.sbt
steps:
- run:
name: Check formatting Sbt files
command: sbt scalafmtSbtCheck
- run:
name: Check formatting Scala files
command: sbt scalafmtCheckAll
- run:
name: Test compile
command: sbt test:compile
- run:
name: It compile
command: sbt it:compile
- run:
name: Unit testing
command: sbt test
Expand All @@ -177,33 +175,19 @@ workflows:
name: Send coverage report to Codacy
command: |
bash <(curl -Ls https://coverage.codacy.com/get.sh)
- run:
name: Clean coverage.sbt from cache
command: rm coverage.sbt
requires:
- codacy/checkout_and_version
- compile
- codacy/sbt:
name: lint
install_sbt_version: 1.8.2
install_sbt_version: 1.10.0
cmd: |
sbt "scalafmtCheckAll;scalafmtSbtCheck;scapegoat;scalafixEnable;scalafix --test"
cache_prefix: *cache_prefix
requires:
- compile
- codacy/sbt:
name: test
install_sbt_version: 1.8.2
cmd: |
git config --global user.email "[email protected]"
git config --global user.name "Codacy Team"
sbt coverage +test coverageReport
bash <(curl -Ls https://coverage.codacy.com/get.sh) report --skip
cache_prefix: *cache_prefix
requires:
- compile
- codacy/sbt:
name: publish_docker_locally
install_sbt_version: 1.8.2
install_sbt_version: 1.10.0
cmd: |
sbt "set codacyAnalysisCli / version := \"dev-snapshot\";
codacyAnalysisCli/stage"
Expand All @@ -228,7 +212,7 @@ workflows:
# - maven_dependencies
- codacy/sbt:
name: publish_lib
install_sbt_version: 1.8.2
install_sbt_version: 1.10.0
context: CodacyAWS
cmd: |
sbt "retrieveGPGKeys;
Expand All @@ -254,7 +238,7 @@ workflows:
- master
- codacy/sbt:
name: build_cli_jar
install_sbt_version: 1.8.2
install_sbt_version: 1.10.0
persist_to_workspace: true
cmd: |
sbt "set codacyAnalysisCli / version := \"$(cat .version)\";
Expand Down
13 changes: 3 additions & 10 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,8 @@ val assemblyCommon = Seq(
oldStrategy(x)
})

inThisBuild(
Seq(
scalaVersion := Common.scalaVersionNumber,
scalaBinaryVersion := Common.scalaBinaryVersionNumber,
scapegoatDisabledInspections := Seq(),
scapegoatVersion := "1.4.6"))
ThisBuild / scalaVersion := Common.scalaVersionNumber
ThisBuild / scalaBinaryVersion := Common.scalaBinaryVersionNumber

val sonatypeInformation = Seq(
startYear := Some(2018),
Expand Down Expand Up @@ -107,9 +103,6 @@ lazy val downloadCodacyToolsSwaggerFile = Def.task[Unit] {
}
}

val silencerSettings =
Seq(libraryDependencies ++= Dependencies.silencer, scalacOptions += "-P:silencer:pathFilters=src_managed")

lazy val codacyApiClient = project
.in(file("codacy-api-client"))
.settings(name := "codacy-api-client", description := "Client library for codacy API")
Expand All @@ -132,4 +125,4 @@ lazy val codacyApiClient = project
tracing = false,
modules = List("circe", "akka-http")))
},
silencerSettings)
scalacOptions += "-Wconf:src=src_managed/.*:silent")
4 changes: 2 additions & 2 deletions project/Common.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ object Common {

private val defaultDockerInstallationPath = "/opt/codacy"
val scalaBinaryVersionNumber = "2.12"
val scalaVersionNumber = s"$scalaBinaryVersionNumber.12"
val scalaVersionNumber = s"$scalaBinaryVersionNumber.19"

val scala213BinaryVersionNumber = "2.13"
val scala213VersionNumber = s"$scala213BinaryVersionNumber.3"
val scala213VersionNumber = s"$scala213BinaryVersionNumber.14"
lazy val supportedScalaVersions = List(Common.scalaVersionNumber, Common.scala213VersionNumber)

val genericSettings = Seq(
Expand Down
4 changes: 0 additions & 4 deletions project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,6 @@ object Dependencies {

val macroParadise = "org.scalamacros" %% "paradise" % "2.1.1"

val silencer = Seq(
compilerPlugin("com.github.ghik" % "silencer-plugin" % silencerVersion cross CrossVersion.full),
"com.github.ghik" % "silencer-lib" % silencerVersion % Provided cross CrossVersion.full)

val scalatest = "org.scalatest" %% "scalatest" % "3.0.8"
val betterFiles = "com.github.pathikrit" %% "better-files" % "3.8.0"
}
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.8.2
sbt.version=1.10.0
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
addSbtPlugin("com.codacy" % "codacy-sbt-plugin" % "25.0.1")

// Coverage
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.6")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.12")

// Static Analysis
addSbtPlugin("com.sksamuel.scapegoat" %% "sbt-scapegoat" % "1.1.0")
addSbtPlugin("com.sksamuel.scapegoat" %% "sbt-scapegoat" % "1.2.4")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.21")

// Dependencies
Expand Down