Skip to content

Support Scala 3 #74

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 22, 2023
Merged
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
24 changes: 21 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ jobs:
strategy:
fail-fast: false
matrix:
scala: ['2.12.17', '2.13.10']
java: ["8", "11", "17"]
scala: ["2.12.17", "2.13.10", "3.2.2"]
steps:
- name: Checkout current branch
uses: actions/checkout@v3.0.2
Expand All @@ -47,7 +48,7 @@ jobs:
- name: Run tests
run: sbt ++${{ matrix.scala }}! test

test-deploy:
website:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
Expand All @@ -64,9 +65,26 @@ jobs:
- name: Check website generation
run: sbt docs/docusaurusCreateSite

publish-local:
runs-on: ubuntu-20.04
timeout-minutes: 10
steps:
- name: Checkout current branch
uses: actions/checkout@v3.3.0
- name: Setup Java
uses: actions/setup-java@v3.9.0
with:
distribution: temurin
java-version: 17
check-latest: true
- name: Cache scala dependencies
uses: coursier/cache-action@v6
- name: Check that building packages works
run: sbt +publishLocal

ci:
runs-on: ubuntu-latest
needs: [lint, test, test-deploy]
needs: [lint, test, website, publish-local]
steps:
- name: Aggregate outcomes
run: echo "build succeeded"
10 changes: 7 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ import Dependencies._

Global / onChangedBuildSource := ReloadOnSourceChanges

val Scala212: String = "2.12.17"
val Scala213: String = "2.13.10"
val Scala3: String = "3.2.2"

inThisBuild(
List(
scalaVersion := "2.13.10",
scalaVersion := Scala213,
organization := "io.lambdaworks",
organizationName := "LambdaWorks",
organizationHomepage := Some(url("https://www.lambdaworks.io/")),
Expand Down Expand Up @@ -39,11 +43,11 @@ ThisBuild / scalafixScalaBinaryVersion := CrossVersion.binaryScalaVersion(scalaV
lazy val root = (project in file("."))
.settings(
name := "scurl-detector",
crossScalaVersions := List("2.12.17", "2.13.10"),
crossScalaVersions := List(Scala212, Scala213, Scala3),
libraryDependencies ++= All,
buildInfoKeys := List[BuildInfoKey](organization, name, version),
buildInfoPackage := "detection",
semanticdbEnabled := true,
semanticdbEnabled := scalaVersion.value != Scala3, // enable SemanticDB
semanticdbVersion := scalafixSemanticdb.revision,
scalacOptions += {
CrossVersion.partialVersion(scalaVersion.value) match {
Expand Down