Skip to content

Commit

Permalink
Scala 3.0.0 (#2)
Browse files Browse the repository at this point in the history
* Upgrade to Scala 3.0.0

* Sort out some warnings

* fixup! Upgrade to Scala 3.0.0
  • Loading branch information
tabdulradi authored May 30, 2021
1 parent 17d4393 commit 67192ff
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 19 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
branches: ['*']
push:
branches: ['*']
tags: [v*]
tags: [v*, v*]

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -23,7 +23,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [3.0.0-RC2]
scala: [3.0.0]
java: [[email protected]]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -49,11 +49,11 @@ jobs:
~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

# - name: Check that workflows are up to date
# run: sbt ++${{ matrix.scala }} githubWorkflowCheck
- name: Check that workflows are up to date
run: sbt ++${{ matrix.scala }} githubWorkflowCheck

- name: Build project
run: sbt ++${{ matrix.scala }} compile
run: sbt ++${{ matrix.scala }} test

- name: Compress target directories
run: tar cf targets.tar target core/target project/target
Expand All @@ -71,7 +71,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [3.0.0-RC2]
scala: [3.0.0]
java: [[email protected]]
runs-on: ${{ matrix.os }}
steps:
Expand All @@ -97,12 +97,12 @@ jobs:
~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

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

- name: Inflate target directories (3.0.0-RC2)
- name: Inflate target directories (3.0.0)
run: |
tar xf targets.tar
rm targets.tar
Expand Down
8 changes: 4 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ inThisBuild(Seq(
homepage := Some(url("https://github.com/tabdulradi/nullable")),
scmInfo := Some(ScmInfo(url("https://github.com/tabdulradi/nullable"), "scm:[email protected]:tabdulradi/nullable.git")),

scalaVersion := "3.0.0-RC2",
scalaVersion := "3.0.0",

libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.2.7" % Test,
"org.scalacheck" %% "scalacheck" % "1.15.3" % Test
"org.scalatest" %% "scalatest" % "3.2.9" % Test,
"org.scalacheck" %% "scalacheck" % "1.15.4" % Test
),
))

Expand All @@ -19,5 +19,5 @@ lazy val root = (project in file("."))
.aggregate(core)
.settings(
name := "nullable",
skip in publish := true
publish / skip := true
)
8 changes: 4 additions & 4 deletions core/src/test/scala/com/abdulradi/nullable/NullableSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,16 @@ class NullableSpec extends AnyFunSuite:
}

test("NullableZipNullable"){
assertEquals(Nullable("foo") zip Nullable("bar"), Nullable(("foo", "bar")))
assertEquals(Nullable("foo").zip(Nullable("bar")), Nullable(("foo", "bar")))
}
test("NullableZipNullable.empty"){
assertEquals(Nullable("foo") zip Nullable.empty[String], null)
assertEquals(Nullable("foo").zip(Nullable.empty[String]), null)
}
test("Nullable.emptyZipNullable"){
assertEquals(Nullable.empty zip Nullable("bar"), null)
assertEquals(Nullable.empty.zip(Nullable("bar")), null)
}
test("Nullable.emptyZipNullable.empty"){
assertEquals(Nullable.empty zip Nullable.empty, null)
assertEquals(Nullable.empty.zip(Nullable.empty), null)
}

test("NullableUnzipToNullablePair"){
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.4.9
sbt.version=1.5.2
1 change: 0 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.3")
addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.6")
addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.10.1")

0 comments on commit 67192ff

Please sign in to comment.