From 429cee8257842d2d5654451d3252b4e27706221a Mon Sep 17 00:00:00 2001 From: Ondra Pelech Date: Fri, 2 Apr 2021 17:41:22 +0200 Subject: [PATCH] Add Scala versions (#117) --- .github/renovate.json | 12 ++++++++ .github/workflows/auto-approve.yml | 2 +- .github/workflows/ci.yml | 2 +- .github/workflows/dependabot-auto-merge.yml | 2 +- .github/workflows/release-drafter.yml | 2 +- .github/workflows/release.yml | 2 +- .mergify.yml | 13 ++++---- .scalafix.conf | 30 +++++++++---------- .../sbtdecentscala/DecentScalaPlugin.scala | 5 ++++ 9 files changed, 44 insertions(+), 26 deletions(-) create mode 100644 .github/renovate.json diff --git a/.github/renovate.json b/.github/renovate.json new file mode 100644 index 0000000..defbaef --- /dev/null +++ b/.github/renovate.json @@ -0,0 +1,12 @@ +{ + "automerge": true, + "labels": ["type: dependencies"], + "packageRules": [ + { + "matchManagers": [ + "sbt" + ], + "enabled": false + } + ] +} diff --git a/.github/workflows/auto-approve.yml b/.github/workflows/auto-approve.yml index e250296..0d800a3 100644 --- a/.github/workflows/auto-approve.yml +++ b/.github/workflows/auto-approve.yml @@ -5,7 +5,7 @@ on: jobs: auto-approve: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: hmarr/auto-approve-action@v2.1.0 if: github.actor == 'scala-steward' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6db76d5..a66ee35 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,7 +3,7 @@ on: pull_request: jobs: ci: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 strategy: fail-fast: false steps: diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml index 9c3bdd4..426578b 100644 --- a/.github/workflows/dependabot-auto-merge.yml +++ b/.github/workflows/dependabot-auto-merge.yml @@ -5,7 +5,7 @@ on: jobs: dependabot-auto-merge: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: ahmadnassri/action-dependabot-auto-merge@v2.4 with: diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/release-drafter.yml index 9161e8e..8ebb2f7 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/release-drafter.yml @@ -7,7 +7,7 @@ on: jobs: update_release_draft: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: release-drafter/release-drafter@v5.15.0 env: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 458d293..0007b84 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,7 @@ on: types: [ published ] jobs: release: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2.3.4 with: diff --git a/.mergify.yml b/.mergify.yml index e111507..3f6849e 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -7,6 +7,13 @@ pull_request_rules: users: [sideeffffect] label: add: ["type: dependencies"] + - name: label scala-steward's breaking PRs + conditions: + - author=scala-steward + - "body~=(labels: library-update, semver-major)|(labels: sbt-plugin-update, semver-major)" + actions: + label: + add: ["type: breaking"] - name: merge Scala Steward's PRs conditions: - base=master @@ -15,8 +22,6 @@ pull_request_rules: actions: merge: method: squash - delete_head_branch: - force: true - name: automatic merge on CI success and review conditions: - base=master @@ -27,8 +32,6 @@ pull_request_rules: actions: merge: method: squash - delete_head_branch: - force: true - name: automatic merge for master when CI passes conditions: - base=master @@ -37,8 +40,6 @@ pull_request_rules: actions: merge: method: squash - delete_head_branch: - force: true - name: automatic update for PR marked mergify-update conditions: - -conflict # skip PRs with conflicts diff --git a/.scalafix.conf b/.scalafix.conf index 0fd279c..6be0abd 100644 --- a/.scalafix.conf +++ b/.scalafix.conf @@ -1,24 +1,16 @@ rules = [ - OrganizeImports - RemoveUnused - NoAutoTupling - LeakingImplicitClassVal - NoValInForComprehension - ProcedureSyntax + Disable DisableSyntax ExplicitResultTypes - Disable + LeakingImplicitClassVal MissingFinal + NoAutoTupling + NoValInForComprehension + OrganizeImports + ProcedureSyntax + RemoveUnused ] -OrganizeImports { - groupedImports = Merge -} - -RemoveUnused { - imports = false // handled by OrganizeImports -} - Disable { ifSynthetic = [ "java/io/Serializable" @@ -44,3 +36,11 @@ DisableSyntax { noWhileLoops = true noXml = true } + +OrganizeImports { + groupedImports = Merge +} + +RemoveUnused { + imports = false // handled by OrganizeImports +} diff --git a/src/main/scala/com/github/sideeffffect/sbtdecentscala/DecentScalaPlugin.scala b/src/main/scala/com/github/sideeffffect/sbtdecentscala/DecentScalaPlugin.scala index 96ab191..d544ad9 100644 --- a/src/main/scala/com/github/sideeffffect/sbtdecentscala/DecentScalaPlugin.scala +++ b/src/main/scala/com/github/sideeffffect/sbtdecentscala/DecentScalaPlugin.scala @@ -27,8 +27,13 @@ object DecentScalaPlugin extends AutoPlugin { } trait DecentScala { + lazy val decentScalaVersion211 = "2.11.12" + lazy val decentScalaVersion212 = "2.12.13" + lazy val decentScalaVersion213 = "2.13.5" lazy val decentScalaSettings: List[Def.Setting[_]] = List( + scalaVersion := decentScalaVersion213, + crossScalaVersions := Seq(decentScalaVersion211, decentScalaVersion212, decentScalaVersion213), libraryDependencies ++= List( compilerPlugin(Dependencies.betterMonadicFor), compilerPlugin(Dependencies.kindProjector),