diff --git a/.github/workflows/scala2.yml b/.github/workflows/scala2.yml new file mode 100644 index 0000000..f182d0c --- /dev/null +++ b/.github/workflows/scala2.yml @@ -0,0 +1,21 @@ +name: Scala CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + - name: Run tests + run: sbt test diff --git a/.gitignore b/.gitignore index dfcfd56..e35676f 100644 --- a/.gitignore +++ b/.gitignore @@ -348,3 +348,6 @@ MigrationBackup/ # Ionide (cross platform F# VS Code tools) working folder .ionide/ + +target +.idea diff --git a/build.sbt b/build.sbt index d54b1b6..30a2b53 100644 --- a/build.sbt +++ b/build.sbt @@ -4,9 +4,9 @@ organization := "com.microsoft.sqlserver.jdbc.spark" version := "1.0.0" -scalaVersion := "2.11.12" - -val sparkVersion = "2.4.6" +scalaVersion := "2.12.11" +ThisBuild / useCoursier := false +val sparkVersion = "3.0.0" javacOptions ++= Seq("-source", "1.8", "-target", "1.8", "-Xlint") @@ -19,11 +19,11 @@ libraryDependencies ++= Seq( "tests", "org.apache.spark" %% "spark-catalyst" % sparkVersion % "test" classifier "tests", - "org.scalatest" %% "scalatest" % "3.0.5" % "test", + "org.scalatest" %% "scalatest" % "3.0.8" % "test", "com.novocode" % "junit-interface" % "0.11" % "test", //SQLServer JDBC jars - "com.microsoft.sqlserver" % "mssql-jdbc" % "7.2.1.jre8" + "com.microsoft.sqlserver" % "mssql-jdbc" % "8.2.1.jre8" ) scalacOptions := Seq("-unchecked", "-deprecation", "evicted") diff --git a/src/test/scala/com/microsoft/sqlserver/jdbc/spark/bulkwrite/DataSourceTest.scala b/src/test/scala/com/microsoft/sqlserver/jdbc/spark/bulkwrite/DataSourceTest.scala index 2935bc5..39c550a 100644 --- a/src/test/scala/com/microsoft/sqlserver/jdbc/spark/bulkwrite/DataSourceTest.scala +++ b/src/test/scala/com/microsoft/sqlserver/jdbc/spark/bulkwrite/DataSourceTest.scala @@ -3,9 +3,9 @@ import java.sql.Connection import org.scalatest.Matchers import org.apache.spark.SparkFunSuite -import org.apache.spark.sql.test.SharedSQLContext +import org.apache.spark.sql.test.SharedSparkSession -class DataSourceTest extends SparkFunSuite with Matchers with SharedSQLContext { +class DataSourceTest extends SparkFunSuite with Matchers with SharedSparkSession { test("Schema validation between Spark DataFrame and SQL Server ResultSet") {}