Skip to content

Commit

Permalink
update plugins, scala version and scala-steward schedule (#88)
Browse files Browse the repository at this point in the history
* update plugins, scala version and scala-steward schedule

* fix build
  • Loading branch information
fgrutsch authored Oct 7, 2022
1 parent ebe0a6f commit 0704908
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 31 deletions.
23 changes: 11 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.13.8, 3.2.0]
scala: [2.13.9, 3.2.0]
java: [temurin@11, temurin@17]
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -62,14 +62,14 @@ jobs:
run: sbt ++${{ matrix.scala }} githubWorkflowCheck

- if: matrix.scala == '3.2.0'
run: sbt ++${{ matrix.scala }} test
run: sbt ++${{ matrix.scala }} coverage test coverageReport coverageAggregate

- if: matrix.scala == '2.13.8'
- if: matrix.scala == '2.13.9'
run: sbt ++${{ matrix.scala }} codeVerify coverage test coverageReport coverageAggregate

- name: Upload coverage to Codecov
if: matrix.scala == '2.13.8'
uses: codecov/codecov-action@v1
if: matrix.scala == '2.13.9'
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true

Expand Down Expand Up @@ -124,12 +124,12 @@ jobs:
~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Download target directories (2.13.8)
- name: Download target directories (2.13.9)
uses: actions/download-artifact@v2
with:
name: target-${{ matrix.os }}-2.13.8-${{ matrix.java }}
name: target-${{ matrix.os }}-2.13.9-${{ matrix.java }}

- name: Inflate target directories (2.13.8)
- name: Inflate target directories (2.13.9)
run: |
tar xf targets.tar
rm targets.tar
Expand All @@ -153,11 +153,10 @@ jobs:

- name: Generate documentation
if: startsWith(github.ref, 'refs/tags/v')
run: sbt docs/makeSite
run: sbt docs/paradox

- name: Publish gh-pages
if: startsWith(github.ref, 'refs/tags/v')
uses: JamesIves/github-pages-deploy-action@v4.2.5
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: docs/target/site
folder: docs/target/paradox/site/main
4 changes: 2 additions & 2 deletions .github/workflows/scala-steward.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# This workflow will launch at 00:00 every Sunday
# This workflow will launch at 00:00 every Sunday and Wednesday
on:
schedule:
- cron: '0 0 * * 0'
- cron: '0 0 * * 0,3'
workflow_dispatch:

name: Launch Scala Steward
Expand Down
3 changes: 0 additions & 3 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,4 @@ version = "3.5.9"
runner.dialect = "scala213source3"
preset = defaultWithAlign
danglingParentheses.preset = false
rewrite.rules = [
SortModifiers
]
maxColumn = 120
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import java.time.LocalDate
ThisBuild / scalafixDependencies += Dependencies.organizeImports
ThisBuild / versionScheme := Some("early-semver")
ThisBuild / scalaVersion := crossScalaVersions.value.last
ThisBuild / crossScalaVersions := Seq("2.13.8", "3.2.0")
ThisBuild / crossScalaVersions := Seq("2.13.9", "3.2.0")

addCommandAlias("codeFmt", ";headerCreate;scalafmtAll;scalafmtSbt;scalafixAll")
addCommandAlias("codeVerify", ";scalafmtCheckAll;scalafmtSbtCheck;scalafixAll --check;headerCheck")
Expand Down Expand Up @@ -90,4 +90,4 @@ lazy val docs = project
)
)
.dependsOn(core)
.enablePlugins(ParadoxSitePlugin)
.enablePlugins(ParadoxPlugin)
10 changes: 5 additions & 5 deletions project/SetupGithubActionsPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ object SetupGithubActionsPlugin extends AutoPlugin {
githubWorkflowJavaVersions += JavaSpec.temurin("17"),
githubWorkflowBuild := Seq(
WorkflowStep.Sbt(
List("test"),
List("coverage", "test", "coverageReport", "coverageAggregate"),
cond = Some(s"matrix.scala == '${crossScalaVersions.value.last}'")
),
WorkflowStep.Sbt(
Expand All @@ -22,7 +22,7 @@ object SetupGithubActionsPlugin extends AutoPlugin {
)
),
githubWorkflowBuildPostamble += WorkflowStep.Use(
UseRef.Public("codecov", "codecov-action", "v1"),
UseRef.Public("codecov", "codecov-action", "v3"),
cond = Some(s"matrix.scala == '${crossScalaVersions.value.head}'"),
name = Some("Upload coverage to Codecov"),
params = Map("fail_ci_if_error" -> "true")
Expand All @@ -42,15 +42,15 @@ object SetupGithubActionsPlugin extends AutoPlugin {
),
githubWorkflowPublishPostamble ++= List(
WorkflowStep.Run(
List("sbt docs/makeSite"),
List("sbt docs/paradox"),
name = Some("Generate documentation"),
cond = Some("startsWith(github.ref, 'refs/tags/v')")
),
WorkflowStep.Use(
UseRef.Public("JamesIves", "github-pages-deploy-action", "v4.2.5"),
UseRef.Public("JamesIves", "github-pages-deploy-action", "v4"),
name = Some("Publish gh-pages"),
cond = Some("startsWith(github.ref, 'refs/tags/v')"),
params = Map("branch" -> "gh-pages", "folder" -> "docs/target/site")
params = Map("folder" -> "docs/target/paradox/site/main")
)
)
)
Expand Down
14 changes: 7 additions & 7 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.3")
addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.14.2")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10")
addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.4.1")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.7.0")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.0")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.3")
addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.14.2")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10")
addSbtPlugin("com.lightbend.paradox" % "sbt-paradox" % "0.10.2")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.7.0")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.4")

0 comments on commit 0704908

Please sign in to comment.