Skip to content

Commit

Permalink
Merge pull request #147 from whisklabs/new-ci
Browse files Browse the repository at this point in the history
Update plugins and create new CI
  • Loading branch information
RicoGit authored Dec 7, 2021
2 parents 15fdaf6 + f34223e commit 96d7f97
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 43 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: CI
on:
push:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup JDK
uses: actions/setup-java@v2
with:
distribution: temurin
java-version: 11
- name: Build and Test
run: sbt -v +test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ target/
target-shaded/
project/sbt-launch-*.jar
.idea/
.bsp/
33 changes: 0 additions & 33 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
docker-it-scala
=============

[![Build Status](https://travis-ci.org/whisklabs/docker-it-scala.svg?branch=master)](https://travis-ci.org/whisklabs/docker-it-scala)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.whisk/docker-testkit-core_2.12/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.whisk/docker-testkit-core_2.12)
[![Join the chat at https://gitter.im/whisklabs/docker-it-scala](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/whisklabs/docker-it-scala?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Expand Down
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ lazy val commonSettings = Seq(
scalaVersion := "2.13.5",
crossScalaVersions := Seq("2.13.5", "2.12.8", "2.11.12"),
scalacOptions ++= Seq("-feature", "-deprecation"),
fork in Test := true,
Test / fork := true,
licenses += ("MIT", url("http://opensource.org/licenses/MIT")),
sonatypeProfileName := "com.whisk",
publishMavenStyle := true,
Expand Down Expand Up @@ -94,7 +94,7 @@ lazy val scalatest =
"ch.qos.logback" % "logback-classic" % "1.2.1" % "test",
"org.postgresql" % "postgresql" % "9.4.1210" % "test")
)
.dependsOn(core, testkitSpotifyImpl % "test", testkitDockerJavaImpl % "test", samples % "test")
.dependsOn(core, testkitSpotifyShadedImpl % "test", testkitDockerJavaImpl % "test", samples % "test")

lazy val specs2 =
project
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,26 @@ class DockerConfigSpec extends FlatSpec with Matchers with DockerKitConfig {
.withPorts(9042 -> None)
.withReadyChecker(DockerReadyChecker.LogLineContains("Starting listening for CQL clients on"))
.withVolumes(volumes)
.withHostConfig(HostConfig(None, None, None))

configureDockerContainer("docker.cassandra") shouldBe cassandraExpected

val postgresExpected = DockerContainer("postgres:9.4.4")
.withPorts((5432, None))
.withEnv(s"POSTGRES_USER=nph", s"POSTGRES_PASSWORD=suitup")
.withReadyChecker(
DockerReadyChecker.LogLineContains("database system is ready to accept connections"))
DockerReadyChecker.LogLineContains("database system is ready to accept connections")
)
.withHostConfig(HostConfig(None, None, None))


configureDockerContainer("docker.postgres") shouldBe postgresExpected

val mongodbExpected = DockerContainer("mongo:3.0.6")
.withPorts(27017 -> None)
.withReadyChecker(DockerReadyChecker.LogLineContains("waiting for connections on port"))
.withCommand("mongod", "--nojournal", "--smallfiles", "--syncdelay", "0")
.withHostConfig(HostConfig(None, None, None))

configureDockerContainer("docker.mongodb") shouldBe mongodbExpected

Expand All @@ -44,7 +49,8 @@ class DockerConfigSpec extends FlatSpec with Matchers with DockerKitConfig {
DockerReadyChecker
.HttpResponseCode(9200, "/")
.within(100.millis)
.looped(20, 1250.millis))
.looped(20, 1250.millis)
)

configureDockerContainer("docker.elasticsearch") shouldBe elasticExpected
}
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.2.8
sbt.version=1.5.5
6 changes: 3 additions & 3 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "2.0")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.10")

addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.0-M1")
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2")

addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "1.2.0")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.5")
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class DependencyGraphReadyCheckSpec extends FlatSpec with Matchers with DockerKi
"SCHEMA_REGISTRY_KAFKASTORE_CONNECTION_URL=zookeeper:2181")
.withLinks(ContainerLink(zookeeperContainer, "zookeeper"),
ContainerLink(kafkaContainer, "kafka"))
.withReadyChecker(DockerReadyChecker.LogLineContains("Server started, listening for requests"))
.withReadyChecker(DockerReadyChecker.LogLineContains("Session establishment complete on server"))

override def dockerContainers =
schemaRegistryContainer :: kafkaContainer :: zookeeperContainer :: super.dockerContainers
Expand Down

0 comments on commit 96d7f97

Please sign in to comment.