Skip to content

Commit 0be7a97

Browse files
authored
Merge pull request #45 from oleg-py/gh-actions
Add github action for to run test on PRs and pushes
2 parents d4521cc + ae69ffa commit 0be7a97

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
lines changed

.github/workflows/scala.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: test
2+
3+
on: [ push, pull_request ]
4+
5+
jobs:
6+
run-tests:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
matrix:
10+
scala: ["2.11.12", "2.12.11", "2.13.1"]
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: olafurpg/setup-scala@v7
15+
with:
16+
java-version: [email protected]
17+
- name: Run tests
18+
run: sbt test
19+
env:
20+
SCALA_VERSION: ${{ matrix.scala }}

build.sbt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import xerial.sbt.Sonatype._
22

3-
lazy val scala213 = "2.13.0"
4-
lazy val scala212 = "2.12.8"
3+
lazy val scala213 = "2.13.1"
4+
lazy val scala212 = "2.12.11"
55
lazy val scala211 = "2.11.12"
66

77
lazy val supportedScalaVersions = List(scala211, scala212, scala213)
@@ -10,7 +10,7 @@ ThisBuild / organization := "com.olegpy"
1010
ThisBuild / version := "0.3.1"
1111
ThisBuild / licenses += ("MIT", url("http://opensource.org/licenses/MIT"))
1212
ThisBuild / homepage := Some(url("http://github.com/oleg-py/better-monadic-for"))
13-
ThisBuild / scalaVersion := scala212
13+
ThisBuild / scalaVersion := Option(System.getenv("SCALA_VERSION")).filter(_.nonEmpty).getOrElse(scala213)
1414

1515
val testSettings = Seq(
1616
libraryDependencies ++= Seq(
@@ -36,7 +36,7 @@ val testSettings = Seq(
3636
)
3737

3838
lazy val root = (project in file("."))
39-
.aggregate(betterMonadicFor, pluginTests, catsTests, scalazTests, pcplodTests)
39+
.aggregate(betterMonadicFor, pluginTests, catsTests, scalazTests)
4040
.settings(
4141
crossScalaVersions := Nil,
4242
publish / skip := true
@@ -82,7 +82,7 @@ lazy val catsTests = (project in file("cats-tests"))
8282
name := "cats-tests",
8383
crossScalaVersions := List(scala211, scala212),
8484
libraryDependencies ++= Seq(
85-
"org.typelevel" %% "cats-core" % "1.6.0" % Test
85+
"org.typelevel" %% "cats-core" % "2.0.0" % Test
8686
)
8787
)
8888
.settings(testSettings)
@@ -107,4 +107,4 @@ lazy val wartRemoverTests = (project in file("wartremover-tests"))
107107
addCompilerPlugin("org.wartremover" %% "wartremover" % "2.4.2"),
108108
scalacOptions += "-P:wartremover:traverser:org.wartremover.warts.NonUnitStatements"
109109
)
110-
.settings(testSettings)
110+
.settings(testSettings)

0 commit comments

Comments
 (0)