Skip to content

Commit

Permalink
Merge pull request #387 from xuwei-k/examples
Browse files Browse the repository at this point in the history
update examples. add travis test
  • Loading branch information
rickynils committed Apr 21, 2018
2 parents 61733e0 + a8b0e4e commit 3eee567
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 10 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ matrix:
- curl https://raw.githubusercontent.com/scala-native/scala-native/master/scripts/travis_setup.sh | bash -x
sudo: required
env: PLATFORM=native SBT_PARALLEL=true WORKERS=1 DEPLOY=true
- env: EXAMPLES
script:
- cd examples
- for d in */ ; do cd "$d" && sbt test:compile && cd ../ ; done
exclude:
- scala: 2.10.7
env: PLATFORM=js SBT_PARALLEL=true WORKERS=1 DEPLOY=true SCALAJS_VERSION=1.0.0-M3
4 changes: 2 additions & 2 deletions examples/commands-leveldb/build.sbt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name := "commands-leveldb"

scalaVersion := "2.11.5"
scalaVersion := "2.12.4"

libraryDependencies ++= Seq(
"org.scalacheck" %% "scalacheck" % "1.12.2",
"org.scalacheck" %% "scalacheck" % "1.13.5",
"org.fusesource.leveldbjni" % "leveldbjni-all" % "1.8"
// "org.fusesource.leveldbjni" % "leveldbjni-all" % "1.7"
// "org.fusesource.leveldbjni" % "leveldbjni-all" % "1.6.1"
Expand Down
4 changes: 2 additions & 2 deletions examples/commands-nix/build.sbt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name := "commands-nix"

scalaVersion := "2.11.5"
scalaVersion := "2.12.4"

libraryDependencies ++= Seq(
"org.scalacheck" %% "scalacheck" % "1.12.2",
"org.scalacheck" %% "scalacheck" % "1.13.5",
"net.java.dev.jna" % "jna" % "4.0.0"
)

Expand Down
2 changes: 1 addition & 1 deletion examples/commands-nix/src/test/scala/CommandsNix.scala
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ object MachineSpec extends Commands {
idGen = Gen.listOfN(8, Gen.alphaLowerChar).map(_.mkString)
ids <- Gen.listOfN(machineCount, idGen)
subnet <- genSubnet
machines <- Gen.sequence[List,Machine](ids.map(genMachine(_, subnet)))
machines <- Gen.sequence[List[Machine], Machine](ids.map(genMachine(_, subnet)))
} yield machines

def genPingOffline(state: State): Gen[Ping] = for {
Expand Down
6 changes: 3 additions & 3 deletions examples/commands-redis/build.sbt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name := "commands-redis"

scalaVersion := "2.11.5"
scalaVersion := "2.12.4"

libraryDependencies ++= Seq(
"org.scalacheck" %% "scalacheck" % "1.12.2",
"org.scalacheck" %% "scalacheck" % "1.13.5",
"org.slf4j" % "slf4j-simple" % "1.7.7",
"net.debasishg" %% "redisclient" % "2.13"
"net.debasishg" %% "redisclient" % "3.4"
)
4 changes: 2 additions & 2 deletions examples/simple-sbt/build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name := "scalacheck-demo"

scalaVersion := "2.11.5"
scalaVersion := "2.12.4"

libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.12.2" % "test"
libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.13.5" % "test"

testOptions in Test += Tests.Argument(TestFrameworks.ScalaCheck, "-maxSize", "5", "-minSuccessfulTests", "33", "-workers", "1", "-verbosity", "1")

0 comments on commit 3eee567

Please sign in to comment.