diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 19f4dff..b7e41ac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,43 +1,13 @@ name: CI -on: [ push, pull_request ] +on: + push: + branches: [ master ] + pull_request: + +permissions: + contents: read jobs: test: - - runs-on: ubuntu-latest - - # not setting up a matrix strategy because the project uses sbt-projectmatrix - - steps: - - uses: actions/checkout@v5 - - - uses: coursier/cache-action@v6 - - - name: setup Java 17 - uses: actions/setup-java@v5 - with: - java-version: '17' - distribution: 'oracle' - cache: 'sbt' - - - name: setup SBT - uses: sbt/setup-sbt@v1 - - - name: build - run: sbt clean check coverage test - - - name: test coverage - if: success() - env: - COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} - COVERALLS_FLAG_NAME: Scala ${{ matrix.scala }} - run: sbt coverageReport coverageAggregate coveralls - - - name: slack - uses: homoluctus/slatify@master - if: failure() && github.ref == 'refs/heads/master' - with: - type: ${{ job.status }} - job_name: Build - url: ${{ secrets.SLACK_WEBHOOK }} \ No newline at end of file + uses: evolution-gaming/scala-github-actions/.github/workflows/ci.yml@f02d2d572f3070fba1fd22edfb02070e57a0651b # v7.0.0 \ No newline at end of file diff --git a/.github/workflows/dependency-graph.yml b/.github/workflows/dependency-graph.yml index 8430d4a..a519ab2 100644 --- a/.github/workflows/dependency-graph.yml +++ b/.github/workflows/dependency-graph.yml @@ -9,4 +9,4 @@ permissions: jobs: submit: - uses: evolution-gaming/scala-github-actions/.github/workflows/dependency-graph.yml@2a50f1819b6fef2657ba802fd62612b7fc8450f0 # v6.4.0 + uses: evolution-gaming/scala-github-actions/.github/workflows/dependency-graph.yml@f02d2d572f3070fba1fd22edfb02070e57a0651b # v7.0.0 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4dcd765..b434a52 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,9 +5,12 @@ on: tags: - 'v*' +permissions: + contents: write + jobs: release: - uses: evolution-gaming/scala-github-actions/.github/workflows/release.yml@v4 + uses: evolution-gaming/scala-github-actions/.github/workflows/release.yml@f02d2d572f3070fba1fd22edfb02070e57a0651b # v7.0.0 secrets: inherit with: verify_sbt_command: 'clean; check; all test package' diff --git a/.scalafix.conf b/.scalafix.conf deleted file mode 100644 index 7d8ffb7..0000000 --- a/.scalafix.conf +++ /dev/null @@ -1,7 +0,0 @@ -rules = [OrganizeImports] - -OrganizeImports { - preset = INTELLIJ_2020_3 - removeUnused = false # `true` is not supported in Scala 3.3.0 - targetDialect = Auto -} \ No newline at end of file diff --git a/build.sbt b/build.sbt index 9984338..ddf8222 100644 --- a/build.sbt +++ b/build.sbt @@ -28,6 +28,12 @@ lazy val commonSettings = Seq( publishTo := Some(Resolver.evolutionReleases), versionScheme := Some("semver-spec"), versionPolicyIntention := Compatibility.BinaryCompatible, + versionPolicyIgnored ++= Seq( + // add libraries here that are known to be binary compatible, like: + // transitive dependency of pekko-stream (TLS support), not used by this project + // and not part of its API; 0.6.1 -> 0.7.1 is only breaking under PVP + "com.typesafe" %% "ssl-config-core" + ), ) lazy val root = project @@ -147,12 +153,9 @@ lazy val `sequentially-metrics` = projectMatrix .configureMatrix(asAkkaPekkoModule()) //used by evolution-gaming/scala-github-actions -addCommandAlias( - "check", - "all versionPolicyCheck Compile/doc scalafmtCheckAll scalafmtSbtCheck; scalafixEnable; scalafixAll --check", -) +addCommandAlias("check", "all versionPolicyCheck Compile/doc scalafmtCheckRepo") -addCommandAlias("fmtAll", "all scalafmtAll scalafmtSbt; scalafixEnable; scalafixAll") +addCommandAlias("fmt", "scalafmtRepo") def asAkkaPekkoModule( akkaDependencies: Seq[ModuleID] = Seq.empty, diff --git a/project/plugins.sbt b/project/plugins.sbt index 99dcc9f..95cf525 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,10 +1,15 @@ addSbtPlugin("com.evolution" % "sbt-artifactory-plugin" % "0.1.2") + addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.4.4") -addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.15") -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.5") -addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.14.7") + +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.6.2") + addSbtPlugin("com.evolution" % "sbt-scalac-opts-plugin" % "0.2.0") + addSbtPlugin("ch.epfl.scala" % "sbt-version-policy" % "3.3.0") + addSbtPlugin("com.github.sbt" % "sbt-dynver" % "5.1.1") + addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.8") + addSbtPlugin("com.eed3si9n" % "sbt-projectmatrix" % "0.11.0")