Skip to content

Commit

Permalink
Feature/multi cassandra versions (#854)
Browse files Browse the repository at this point in the history
* Set theme jekyll-theme-cayman

* Trying to test with multiple versions

* Promoting Cassandra version via env

* Adding a default version

* Fixing test

* Setting the version

* Adding an older version of Cassandra

* Using upper and lowercase env
  • Loading branch information
alexflav23 committed Oct 28, 2018
1 parent b042608 commit cf110bf
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 6 deletions.
12 changes: 12 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ before_cache:
- find $HOME/.sbt -name "*.lock" -delete
env:
global:
- CASSANDRA_VERSION: 3.11
- TARGET_SCALA_VERSION: 2.12.7
- GH_REF: github.com/outworkers/phantom.git
- secure: V5iziDRj988+kcpW6PHOjZZYoayDi2+Fjx2Y6F9dL2mYw3kcjrwyyQgpWoMPMrXHdR61xoollyytgZPfavNViocNxYZMVRfQBLeTCd+mvuLQEvra6aRWl7XaYlpGi5+uHEh5k84MsRNsEZKiiuabxMRZvglZSC8QHYqYgDx3rho=
Expand All @@ -37,7 +38,18 @@ matrix:
include:
- scala: 2.12.7
jdk: oraclejdk8
- scala: 2.12.7
jdk: oraclejdk8
env: CASSANDRA_VERSION=3.11.3
- scala: 2.12.7
jdk: oraclejdk8
env: CASSANDRA_VERSION=3.0.17
- scala: 2.11.12
jdk: oraclejdk8
env: CASSANDRA_VERSION=2.2.9

before_install: unset SBT_OPTS JVM_OPTS

install:
- ./build/install_cassandra.sh
before_script:
Expand Down
3 changes: 2 additions & 1 deletion build/install_cassandra.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ pip install --user 'urllib3'
pip install --user 'requests[security]'
pip install --user ccm

ccm create test -v "3.11" -n 1 -s timeout 60
echo "Installing Cassandra using ccm; version: ${CASSANDRA_VERSION}"
ccm create test -v $CASSANDRA_VERSION -n 1 -s timeout 60
ccm node1 showlog

if [ -e "/var/log/cassandra/" ]; then
Expand Down
1 change: 1 addition & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
theme: jekyll-theme-cayman
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,9 @@ class CQLQueryTest extends FlatSpec with Matchers with GeneratorDrivenPropertyCh

it should "append and wrap a string with ()" in {
forAll { (q1: String, q2: String) =>
CQLQuery(q1).wrap(q2).queryString shouldEqual s"$q1 ($q2)"
whenever(q1.nonEmpty && q2.nonEmpty) {
CQLQuery(q1).wrap(q2).queryString shouldEqual s"$q1 ($q2)"
}
}
}

Expand Down
3 changes: 2 additions & 1 deletion project/Publishing.scala
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ object Publishing {

def publishToMaven: Boolean = sys.env.get("MAVEN_PUBLISH").exists("true" ==)

lazy val pgpPass: Option[Array[Char]] = Properties.envOrNone("pgp_passphrase").map(_.toCharArray)
lazy val pgpPass: Option[Array[Char]] = Properties.envOrNone("pgp_passphrase")
.orElse(Properties.envOrNone("PGP_PASSPHRASE")).map(_.toCharArray)

lazy val mavenSettings: Seq[Def.Setting[_]] = Seq(
credentials += Credentials(Path.userHome / ".ivy2" / ".credentials"),
Expand Down
2 changes: 0 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ dependencyOverrides += "org.apache.thrift" % "libthrift" % "0.8.0"

addSbtPlugin("org.tpolecat" % "tut-plugin" % "0.5.6")

addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "0.8.1")

addSbtPlugin("com.eed3si9n" % "sbt-doge" % "0.1.5")

libraryDependencies += "org.slf4j" % "slf4j-nop" % "1.7.22"
Expand Down
2 changes: 1 addition & 1 deletion version.sbt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
version in ThisBuild := "2.25.0"
version in ThisBuild := "2.25.0-SNAPSHOT"

0 comments on commit cf110bf

Please sign in to comment.