Skip to content

Commit 66a327f

Browse files
committed
Build for Scala 2.12 and 2.13
1 parent 36422ae commit 66a327f

3 files changed

Lines changed: 15 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
branches:
1010
- main
1111
jobs:
12-
test:
12+
test-213:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v2
@@ -21,16 +21,26 @@ jobs:
2121
- name: Test
2222
env:
2323
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24-
run: sbt coverage test coverageReport
24+
run: sbt '++ 2.13.10' coverage test coverageReport
2525
- name: Upload coverage
2626
uses: codecov/codecov-action@v1
2727
with:
2828
token: ${{ secrets.CODECOV_TOKEN }}
2929
fail_ci_if_error: true
3030

31+
test-212:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v2
35+
- uses: olafurpg/setup-scala@v10
36+
- name: Test
37+
env:
38+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
39+
run: sbt '++ 2.12.15' test
40+
3141
publish:
3242
if: ${{ github.event_name != 'pull_request' }}
33-
needs: [test]
43+
needs: [test-213, test-212]
3444
runs-on: ubuntu-latest
3545
steps:
3646
- uses: actions/checkout@v2

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import Dependencies._
22

3-
ThisBuild / scalaVersion := "2.13.10"
43
ThisBuild / versionScheme := Some("early-semver")
54
ThisBuild / organization := "io.github.dataunitylab"
65
ThisBuild / organizationName := "Data Unity Lab"
@@ -24,6 +23,7 @@ val nonConsoleCompilerOptions = Seq(
2423
lazy val root = (project in file("."))
2524
.settings(
2625
name := "Fuzzy Sets",
26+
crossScalaVersions := Seq("2.12.15", "2.13.10"),
2727
libraryDependencies += scalaTest % Test,
2828
scalacOptions ++= nonConsoleCompilerOptions
2929
)

project/plugins.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.4.1")
44
addSbtPlugin("io.kevinlee" % "sbt-github-pages" % "0.7.0")
55
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.0")
66
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0")
7-
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.6.1")
7+
addSbtPlugin("org.scoverage" %% "sbt-scoverage" % "1.6.1")
88
addSbtPlugin("org.wartremover" % "sbt-wartremover" % "3.1.0")
99
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.21")

0 commit comments

Comments
 (0)