Skip to content

Commit d50a23d

Browse files
authored
remove bintray plugin and introduce github actions (#78)
1 parent 50fff4d commit d50a23d

21 files changed

+247
-349
lines changed

.github/release-drafter.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
template: |
2+
## What's changed
3+
4+
$CHANGES
5+
6+
## Contributors
7+
8+
$CONTRIBUTORS

.github/workflows/ci.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches: ['*']
6+
push:
7+
branches: ['*']
8+
tags: ['v*']
9+
10+
11+
jobs:
12+
build:
13+
name: jdk-${{ matrix.java }} Build and Tests
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
os: [ubuntu-latest]
18+
java: [8, 11]
19+
runs-on: ${{ matrix.os }}
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v2
23+
with:
24+
fetch-depth: 0
25+
26+
- name: Setup Scala
27+
uses: olafurpg/setup-scala@v10
28+
with:
29+
java-version: "adopt@1.${{ matrix.java }}"
30+
31+
- uses: actions/cache@v2
32+
with:
33+
path: |
34+
~/.sbt
35+
~/.ivy2/cache
36+
~/.coursier/cache/v1
37+
~/.cache/coursier/v1
38+
key: |
39+
${{ runner.os }}-sbt-${{ hashFiles('project/build.properties') }}-${{ hashFiles('**/*.sbt') }}
40+
41+
- name: Build project
42+
run: sbt clean codeVerify coverage +test coverageReport coverageAggregate
43+
44+
- name: Upload coverage to Codecov
45+
uses: codecov/codecov-action@v1
46+
with:
47+
fail_ci_if_error: true

.github/workflows/release-drafter.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Release Drafter
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
update_release_draft:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: release-drafter/release-drafter@v5
13+
env:
14+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.mergify.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
pull_request_rules:
2+
- name: merge scala-steward PRs
3+
conditions:
4+
- "author=scala-steward"
5+
- "status-success=jdk-8 Build and Tests"
6+
- "status-success=jdk-11 Build and Tests"
7+
actions:
8+
merge:
9+
method: squash

.scalafix.conf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
rules = [
2+
OrganizeImports
3+
]
4+
5+
OrganizeImports {
6+
coalesceToWildcardImportThreshold = 6
7+
expandRelative = true
8+
groupedImports = Merge
9+
removeUnused = true
10+
}

.scalafmt.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ rewrite.rules = [
66
SortImports
77
]
88
maxColumn = 120
9-
optIn.breakChainOnFirstMethodDot = true
9+
docstrings = JavaDoc

.travis.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ This is a fork of [danischroeter/akka-persistence-query-view](https://github.com
22

33
# Persistence query view
44

5-
[![Build Status](https://travis-ci.org/firstbirdtech/akka-persistence-query-view.svg?branch=master)](https://travis-ci.org/firstbirdtech/akka-persistence-query-view)
6-
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/66787c8342914d8bb3d0ea922dc37908)](https://www.codacy.com/gh/firstbirdtech/akka-persistence-query-view?utm_source=github.com&utm_medium=referral&utm_content=firstbirdtech/akka-persistence-query-view&utm_campaign=Badge_Grade)
7-
[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/66787c8342914d8bb3d0ea922dc37908)](https://www.codacy.com/gh/firstbirdtech/akka-persistence-query-view?utm_source=github.com&utm_medium=referral&utm_content=firstbirdtech/akka-persistence-query-view&utm_campaign=Badge_Coverage)
85
[![Maven Central](https://img.shields.io/maven-central/v/com.firstbird/akka-persistence-query-view_2.13.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.firstbird%22%20AND%20a:%22akka-persistence-query-view_2.13%22)
6+
[![Github Actions CI Workflow](https://github.com/firstbirdtech/akka-persistence-query-view/workflows/CI/badge.svg)](https://github.com/firstbirdtech/akka-persistence-query-view/workflows/CI/badge.svg)
7+
[![codecov](https://codecov.io/gh/firstbirdtech/akka-persistence-query-view/branch/master/graph/badge.svg?token=3WIUBL914B)](https://codecov.io/gh/firstbirdtech/akka-persistence-query-view)
8+
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
9+
[![Scala Steward badge](https://img.shields.io/badge/Scala_Steward-helping-blue.svg?style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAMAAAARSr4IAAAAVFBMVEUAAACHjojlOy5NWlrKzcYRKjGFjIbp293YycuLa3pYY2LSqql4f3pCUFTgSjNodYRmcXUsPD/NTTbjRS+2jomhgnzNc223cGvZS0HaSD0XLjbaSjElhIr+AAAAAXRSTlMAQObYZgAAAHlJREFUCNdNyosOwyAIhWHAQS1Vt7a77/3fcxxdmv0xwmckutAR1nkm4ggbyEcg/wWmlGLDAA3oL50xi6fk5ffZ3E2E3QfZDCcCN2YtbEWZt+Drc6u6rlqv7Uk0LdKqqr5rk2UCRXOk0vmQKGfc94nOJyQjouF9H/wCc9gECEYfONoAAAAASUVORK5CYII=)](https://scala-steward.org)
910

1011
The `QueryView` is a replacement of the deprecated `PersistentView` in Akka Persistence module.
1112

RELEASING.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Releasing
2+
3+
To release a new version of akka persistence query view follow the following steps:
4+
5+
1. Make sure all changes are commited to the master branch and that the builds successfully passed
6+
2. Use git to tag the lastest master commit with the new version: `git tag -a vx.x.x -m "vx.x.x"`
7+
3. Push local git tag to remote using `git push --follow-tags`
8+
4. Wait until [GitHub Action](https://github.com/firstbirdtech/akka-persistence-query-view/actions?query=workflow%3ACI) finished the publish job
9+
5. Create a new release in [GitHub](https://github.com/firstbirdtech/akka-persistence-query-view/releases)

build.sbt

Lines changed: 50 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,59 @@
1-
val homepageUrl = url("https://github.com/firstbirdtech/akka-persistence-query-view")
2-
val scmUrl = "https://github.com/firstbirdtech/akka-persistence-query-view.git"
1+
ThisBuild / scalafixDependencies += "com.github.liancheng" %% "organize-imports" % "0.5.0"
2+
3+
addCommandAlias("codeFmt", ";scalafmtAll;scalafmtSbt;scalafixAll")
4+
addCommandAlias("codeVerify", ";scalafmtCheckAll;scalafmtSbtCheck;scalafixAll --check")
5+
6+
lazy val commonSettings = Seq(
7+
organization := "com.firstbird",
8+
organizationName := "Firstbird GmbH",
9+
sonatypeProfileName := "com.firstbird",
10+
homepage := Some(url("https://github.com/firstbirdtech/akka-persistence-query-view")),
11+
licenses += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0")),
12+
scmInfo := Some(
13+
ScmInfo(homepage.value.get, "scm:git:https://github.com/firstbirdtech/akka-persistence-query-view.git")
14+
),
15+
developers += Developer(
16+
"contributors",
17+
"Contributors",
18+
19+
url("https://github.com/firstbirdtech/backbone/graphs/contributors")
20+
),
21+
startYear := Some(2016),
22+
scalaVersion := "2.13.3",
23+
crossScalaVersions := Seq("2.12.11", scalaVersion.value),
24+
scalacOptions ++= Seq(
25+
"-deprecation",
26+
"-encoding",
27+
"utf-8",
28+
"-explaintypes",
29+
"-feature",
30+
"-language:higherKinds",
31+
"-unchecked",
32+
"-Xcheckinit",
33+
"-Xfatal-warnings"
34+
),
35+
scalacOptions ++= (
36+
CrossVersion.partialVersion(scalaVersion.value) match {
37+
case Some((2, 13)) => Seq("-Wdead-code", "-Wunused:imports")
38+
case _ => Seq("-Xfuture", "-Ywarn-dead-code", "-Ywarn-unused:imports", "-Yno-adapted-args")
39+
}
40+
),
41+
javacOptions ++= Seq(
42+
"-Xlint:unchecked",
43+
"-Xlint:deprecation"
44+
),
45+
// show full stack traces and test case durations
46+
testOptions in Test += Tests.Argument("-oDF"),
47+
semanticdbEnabled := true,
48+
semanticdbVersion := scalafixSemanticdb.revision
49+
)
350

451
lazy val root = project
552
.in(file("."))
53+
.settings(commonSettings)
654
.settings(
7-
organization := "com.firstbird",
8-
organizationName := "Firstbird GmbH",
9-
organizationHomepage := Some(url("https://www.firstbird.com")),
1055
name := "akka-persistence-query-view",
11-
description := "An Akka PersistentView replacement",
12-
homepage := Some(homepageUrl),
13-
scmInfo := Some(
14-
ScmInfo(homepageUrl, scmUrl)
15-
),
16-
startYear := Some(2016),
17-
licenses := Seq(("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0"))),
18-
developers += Developer(
19-
"contributors",
20-
"Contributors",
21-
22-
homepageUrl
23-
),
24-
scalacOptions ++= Seq(
25-
"-deprecation", // Emit warning and location for usages of deprecated APIs.
26-
"-explaintypes", // Explain type errors in more detail.
27-
"-feature", // Emit warning and location for usages of features that should be imported explicitly.
28-
"-unchecked", // Enable additional warnings where generated code depends on assumptions.
29-
"-Xcheckinit", // Wrap field accessors to throw an exception on uninitialized access.
30-
"-Xfatal-warnings", // Fail the compilation if there are any warnings.
31-
"-Xlint:adapted-args", // Warn if an argument list is modified to match the receiver.
32-
"-Xlint:constant", // Evaluation of a constant arithmetic expression results in an error.
33-
"-Xlint:delayedinit-select", // Selecting member of DelayedInit.
34-
"-Xlint:doc-detached", // A Scaladoc comment appears to be detached from its element.
35-
"-Xlint:inaccessible", // Warn about inaccessible types in method signatures.
36-
"-Xlint:infer-any", // Warn when a type argument is inferred to be `Any`.
37-
"-Xlint:missing-interpolator", // A string literal appears to be missing an interpolator id.
38-
"-Xlint:nullary-override", // Warn when non-nullary `def f()' overrides nullary `def f'.
39-
"-Xlint:nullary-unit", // Warn when nullary methods return Unit.
40-
"-Xlint:option-implicit", // Option.apply used implicit view.
41-
"-Xlint:package-object-classes", // Class or object defined in package object.
42-
"-Xlint:poly-implicit-overload", // Parameterized overloaded implicit methods are not visible as view bounds.
43-
"-Xlint:private-shadow", // A private field (or class parameter) shadows a superclass field.
44-
"-Xlint:stars-align", // Pattern sequence wildcard must align with sequence component.
45-
"-Xlint:type-parameter-shadow", // A local type parameter shadows a type already in scope.
46-
"-Ywarn-dead-code", // Warn when dead code is identified.
47-
"-Ywarn-extra-implicit", // Warn when more than one implicit parameter section is defined.
48-
"-Ywarn-numeric-widen", // Warn when numerics are widened.
49-
"-Ywarn-unused:implicits", // Warn if an implicit parameter is unused.
50-
"-Ywarn-unused:imports", // Warn if an import selector is not referenced.
51-
"-Ywarn-unused:locals", // Warn if a local definition is unused.
52-
"-Ywarn-unused:params", // Warn if a value parameter is unused.
53-
"-Ywarn-unused:patvars", // Warn if a variable bound in a pattern is unused.
54-
"-Ywarn-unused:privates", // Warn if a private member is unused.
55-
"-Ywarn-value-discard" // Warn when non-Unit expression results are unused.
56-
),
57-
javacOptions ++= Seq(
58-
"-Xlint:unchecked",
59-
"-Xlint:deprecation"
60-
),
6156
libraryDependencies ++= Dependencies.core,
6257
// Needed because the API doc for Akka-Persistence can't be found and the warning would abort publishing
6358
Compile / doc / scalacOptions := Seq()
6459
)
65-
66-
lazy val docs = project
67-
.in(file("mdocs"))
68-
.settings(
69-
mdocOut := new File("."),
70-
mdocVariables := Map(
71-
"VERSION" -> version.value
72-
)
73-
)
74-
.dependsOn(root)
75-
.enablePlugins(MdocPlugin)

0 commit comments

Comments
 (0)