Skip to content

Commit

Permalink
Version 0.13-RC2
Browse files Browse the repository at this point in the history
  • Loading branch information
Daenyth committed Oct 8, 2020
1 parent ac5d75d commit e9a4496
Show file tree
Hide file tree
Showing 16 changed files with 324 additions and 72 deletions.
174 changes: 174 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
# This file was automatically generated by sbt-github-actions using the
# githubWorkflowGenerate task. You should add and commit this file to
# your git repository. It goes without saying that you shouldn't edit
# this file by hand! Instead, if you wish to make changes, you should
# change your sbt build configuration to revise the workflow description
# to meet your needs, then regenerate this file.

name: Continuous Integration

on:
pull_request:
branches: ['*']
push:
branches: ['*']

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
build:
name: Build and Test
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.12.12, 2.13.3]
java: [adopt@1.8]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Java and Scala
uses: olafurpg/setup-scala@v5
with:
java-version: ${{ matrix.java }}

- name: Cache ivy2
uses: actions/cache@v1
with:
path: ~/.ivy2/cache
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Cache coursier (generic)
uses: actions/cache@v1
with:
path: ~/.coursier/cache/v1
key: ${{ runner.os }}-generic-sbt-coursier-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Cache coursier (linux)
if: contains(runner.os, 'linux')
uses: actions/cache@v1
with:
path: ~/.cache/coursier/v1
key: ${{ runner.os }}-sbt-coursier-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Cache coursier (macOS)
if: contains(runner.os, 'macos')
uses: actions/cache@v1
with:
path: ~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-coursier-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Cache coursier (windows)
if: contains(runner.os, 'windows')
uses: actions/cache@v1
with:
path: ~/AppData/Local/Coursier/Cache/v1
key: ${{ runner.os }}-sbt-coursier-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Cache sbt
uses: actions/cache@v1
with:
path: ~/.sbt
key: ${{ runner.os }}-sbt-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

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

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

- name: Compress target directories
run: tar cf targets.tar streamz-examples/target streamz-camel-fs2/target target streamz-camel-context/target streamz-camel-akka/target streamz-converter/target project/target

- name: Upload target directories
uses: actions/upload-artifact@v2
with:
name: target-${{ matrix.os }}-${{ matrix.scala }}-${{ matrix.java }}
path: targets.tar

publish:
name: Publish Artifacts
needs: [build]
if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/master')
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.13.3]
java: [adopt@1.8]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Setup Java and Scala
uses: olafurpg/setup-scala@v5
with:
java-version: ${{ matrix.java }}

- name: Cache ivy2
uses: actions/cache@v1
with:
path: ~/.ivy2/cache
key: ${{ runner.os }}-sbt-ivy-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Cache coursier (generic)
uses: actions/cache@v1
with:
path: ~/.coursier/cache/v1
key: ${{ runner.os }}-generic-sbt-coursier-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Cache coursier (linux)
if: contains(runner.os, 'linux')
uses: actions/cache@v1
with:
path: ~/.cache/coursier/v1
key: ${{ runner.os }}-sbt-coursier-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Cache coursier (macOS)
if: contains(runner.os, 'macos')
uses: actions/cache@v1
with:
path: ~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-coursier-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Cache coursier (windows)
if: contains(runner.os, 'windows')
uses: actions/cache@v1
with:
path: ~/AppData/Local/Coursier/Cache/v1
key: ${{ runner.os }}-sbt-coursier-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Cache sbt
uses: actions/cache@v1
with:
path: ~/.sbt
key: ${{ runner.os }}-sbt-cache-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

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

- name: Inflate target directories (2.12.12)
run: |
tar xf targets.tar
rm targets.tar
- name: Download target directories (2.13.3)
uses: actions/download-artifact@v2
with:
name: target-${{ matrix.os }}-2.13.3-${{ matrix.java }}

- name: Inflate target directories (2.13.3)
run: |
tar xf targets.tar
rm targets.tar
- name: Publish project
run: sbt ++${{ matrix.scala }} +publish
59 changes: 59 additions & 0 deletions .github/workflows/clean.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# This file was automatically generated by sbt-github-actions using the
# githubWorkflowGenerate task. You should add and commit this file to
# your git repository. It goes without saying that you shouldn't edit
# this file by hand! Instead, if you wish to make changes, you should
# change your sbt build configuration to revise the workflow description
# to meet your needs, then regenerate this file.

name: Clean

on: push

jobs:
delete-artifacts:
name: Delete Artifacts
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Delete artifacts
run: |
# Customize those three lines with your repository and credentials:
REPO=${GITHUB_API_URL}/repos/${{ github.repository }}
# A shortcut to call GitHub API.
ghapi() { curl --silent --location --user _:$GITHUB_TOKEN "$@"; }
# A temporary file which receives HTTP response headers.
TMPFILE=/tmp/tmp.$$
# An associative array, key: artifact name, value: number of artifacts of that name.
declare -A ARTCOUNT
# Process all artifacts on this repository, loop on returned "pages".
URL=$REPO/actions/artifacts
while [[ -n "$URL" ]]; do
# Get current page, get response headers in a temporary file.
JSON=$(ghapi --dump-header $TMPFILE "$URL")
# Get URL of next page. Will be empty if we are at the last page.
URL=$(grep '^Link:' "$TMPFILE" | tr ',' '\n' | grep 'rel="next"' | head -1 | sed -e 's/.*<//' -e 's/>.*//')
rm -f $TMPFILE
# Number of artifacts on this page:
COUNT=$(( $(jq <<<$JSON -r '.artifacts | length') ))
# Loop on all artifacts on this page.
for ((i=0; $i < $COUNT; i++)); do
# Get name of artifact and count instances of this name.
name=$(jq <<<$JSON -r ".artifacts[$i].name?")
ARTCOUNT[$name]=$(( $(( ${ARTCOUNT[$name]} )) + 1))
id=$(jq <<<$JSON -r ".artifacts[$i].id?")
size=$(( $(jq <<<$JSON -r ".artifacts[$i].size_in_bytes?") ))
printf "Deleting '%s' #%d, %'d bytes\n" $name ${ARTCOUNT[$name]} $size
ghapi -X DELETE $REPO/actions/artifacts/$id
done
done
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ target/
.bloop/
.metals/
project/metals.sbt
project/project/
.vscode/settings.json
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,29 @@ Dependencies
Streamz artifacts are available for Scala 2.12 and 2.13 at:

resolvers += "streamz at bintray" at "http://dl.bintray.com/streamz/maven"
val streamzVersion = "0.11-RC1"
val streamzVersion = "0.13"

libraryDependencies ++= Seq(
"com.github.krasserm" %% "streamz-camel-akka" % streamzVersion,
"com.github.krasserm" %% "streamz-camel-fs2" % streamzVersion,
"com.github.krasserm" %% "streamz-converter" % streamzVersion,
)

| Streamz version | fs2 version |
| --- | --- |
| (not yet) | 3.0.x |
| 0.13 | 2.x |
| 0.10-M2 | 1.x |
| 0.9.1 | 0.10.x |
| 0.8.1 | 0.9.x |

### Latest milestone release for FS2 1.0.x

val streamzVersion = "0.10-M2"

### Latest stable release for FS2 0.10.x

val streamzVersion = "0.9.1"
val streamzVersion = "0.9.1"

### Latest stable release for FS2 0.9.x

Expand All @@ -41,7 +49,7 @@ Streamz artifacts are available for Scala 2.12 and 2.13 at:
Documentation
-------------

### Streamz 0.11-RC1
### Streamz 0.13

- [Camel DSL for Akka Streams](streamz-camel-akka/README.md)
- [Camel DSL for FS2](streamz-camel-fs2/README.md)
Expand Down Expand Up @@ -72,7 +80,7 @@ Documentation
API docs
--------

## Latest version (0.11-RC1)
## Latest version
- [API docs for Scala 2.13](http://krasserm.github.io/streamz/scala-2.13/unidoc/index.html)
- [API docs for Scala 2.12](http://krasserm.github.io/streamz/scala-2.12/unidoc/index.html)
- [API docs for Scala 2.11](http://krasserm.github.io/streamz/scala-2.11/unidoc/index.html)
Expand All @@ -85,11 +93,11 @@ Not published. Run `sbt unidoc` on tag `0.10-M2` for generating 0.10 API docs.

### Streamz 0.9.1

Not published. Run `sbt unidoc` on branch `r-0.9` for generating 0.9 API docs.
Not published. Run `sbt unidoc` on branch `r-0.9` for generating 0.9 API docs.

### Streamz 0.8.1

Not published. Run `sbt unidoc` on branch `r-0.8` for generating 0.8 API docs.
Not published. Run `sbt unidoc` on branch `r-0.8` for generating 0.8 API docs.

External examples
-----------------
Expand Down
23 changes: 15 additions & 8 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,27 @@ import scalariform.formatter.preferences._
// ---------------------------------------------------------------------------

name := "streamz"
ThisBuild / organization := "com.github.krasserm"
ThisBuild / version := "0.13-RC2"
ThisBuild / versionScheme := Some("early-semver")
ThisBuild / licenses += "Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")

organization in ThisBuild := "com.github.krasserm"
ThisBuild / crossScalaVersions := Seq("2.12.12", "2.13.3")
ThisBuild / scalaVersion := "2.13.3"

version in ThisBuild := "0.12"

crossScalaVersions in ThisBuild := Seq("2.12.11", "2.13.1")

scalaVersion in ThisBuild := "2.12.11"

libraryDependencies in ThisBuild += "org.scalatest" %% "scalatest" % Version.Scalatest % "test"
ThisBuild / libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest-wordspec" % Version.Scalatest % "test",
"org.scalatest" %% "scalatest-shouldmatchers" % Version.Scalatest % "test",
)

// No need for `sbt doc` to fail on warnings
val docSettings = Compile / doc / scalacOptions -= "-Xfatal-warnings"

ThisBuild / scalafixScalaBinaryVersion := CrossVersion.binaryScalaVersion(scalaVersion.value)

ThisBuild / bintrayOrganization := Some("streamz")
ThisBuild / bintrayReleaseOnPublish := false

// ---------------------------------------------------------------------------
// Code formatter settings
// ---------------------------------------------------------------------------
Expand Down
10 changes: 5 additions & 5 deletions project/Version.scala
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
object Version {
val Akka = "2.6.3"
val Akka = "2.6.9"
val Camel = "2.20.4"
val CatsEffect = "2.0.0"
val Fs2 = "2.2.1"
val CatsEffect = "2.2.0"
val Fs2 = "2.4.4"
val Log4j = "2.13.0"
val JUnitInterface = "0.11"
val Scalatest = "3.0.8"
val Scalatest = "3.2.0"
val Config = "1.4.0"
val ScalaCollectionCompat = "2.1.3"
val ScalaCollectionCompat = "2.2.0"
}
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.3.7
sbt.version=1.4.0
14 changes: 10 additions & 4 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.1")
addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.3")

addSbtPlugin("de.heikoseeberger" % "sbt-header" % "4.1.0")
addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0")

addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.8.2")
addSbtPlugin("org.scalariform" % "sbt-scalariform" % "1.8.3")

addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.7")
addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.13")

addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.9.3")

addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.21")

addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.6")
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,14 @@ import akka.stream.testkit.{ TestPublisher, TestSubscriber }
import akka.testkit.TestKit
import org.apache.camel.ExchangePattern
import org.scalatest.concurrent.Eventually
import org.scalatest.{ Assertion, BeforeAndAfterAll, Matchers, WordSpecLike }
import org.scalatest.{ Assertion, BeforeAndAfterAll }
import streamz.camel.{ StreamContext, StreamMessage }
import scala.concurrent.duration._
import scala.reflect.ClassTag
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpecLike

class EndpointConsumerReplierSpec extends TestKit(ActorSystem("test")) with WordSpecLike with Matchers with BeforeAndAfterAll with Eventually {
class EndpointConsumerReplierSpec extends TestKit(ActorSystem("test")) with AnyWordSpecLike with Matchers with BeforeAndAfterAll with Eventually {
implicit val materializer = Materializer.createMaterializer(system)
implicit val context = StreamContext()

Expand Down
Loading

0 comments on commit e9a4496

Please sign in to comment.