Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to GitHub actions #415

Merged
merged 10 commits into from
May 4, 2022
51 changes: 51 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Check

on:
pull_request:
mkurz marked this conversation as resolved.
Show resolved Hide resolved

push:
branches:
- main # Check main branch after merge

concurrency:
# Only run once for latest commit per ref and cancel other (previous) runs.
group: ci-${{ github.ref }}
cancel-in-progress: true

jobs:
check-code-style:
name: Code Style
uses: playframework/.github/.github/workflows/sbt.yml@v1
with:
cmd: sbt scalafmtCheckAll scalafmtSbtCheck headerCheckAll

# MiMa is not enabled yet, since this library is marked as "API may change".
# check-binary-compatibility:
# name: Binary Compatibility
# uses: playframework/.github/.github/workflows/binary-check.yml@v1

check-docs:
name: Docs
uses: playframework/.github/.github/workflows/sbt.yml@v1
with:
cmd: sbt paradox

tests:
name: Tests
needs: # Waiting more lightweight checks
- "check-code-style"
# - "check-binary-compatibility"
- "check-docs"
uses: playframework/.github/.github/workflows/sbt-matrix.yml@v1
with:
java: >-
[ "11", "8" ]
scala: >-
[ "2.12.15", "2.13.8" ]
cmd: sbt ++$SCALA_VERSION test
mkurz marked this conversation as resolved.
Show resolved Hide resolved

finish:
name: Finish
needs: # Should be last
- "tests"
uses: playframework/.github/.github/workflows/rtm.yml@v1
17 changes: 17 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Publish

on:
push:
branches: # Snapshots
- main
tags: ["*"] # Releases
mkurz marked this conversation as resolved.
Show resolved Hide resolved

jobs:
publish-artifacts:
name: Publish / Artifacts
uses: playframework/.github/.github/workflows/publish.yml@v1
secrets:
username: ${{ secrets.SONATYPE_USERNAME }}
password: ${{ secrets.SONATYPE_PASSWORD }}
pgp_passphrase: ${{ secrets.PGP_PASSPHRASE }}
pgp_secret: ${{ secrets.PGP_SECRET }}
22 changes: 22 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,28 @@
queue_rules:
- name: default
conditions:
# Conditions to get out of the queue (= merged)
- check-success~=/ Ready To Merge$

pull_request_rules:
- name: Merge PRs that are ready
conditions:
- check-success~=/ Ready To Merge$
- check-success=typesafe-cla-validator
- "#approved-reviews-by>=1"
- "#review-requested=0"
- "#changes-requested-reviews-by=0"
- label!=status:block-merge
- label=status:merge-when-green
actions:
queue:
method: merge
name: default

- name: Delete the PR branch after merge
conditions:
- merged
actions:
delete_head_branch: {}
label:
remove: [ "status:merge-when-green" ]
49 changes: 0 additions & 49 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ val playActionsTestData = Project("play-grpc-actions-testdata", file("play-actio
.pluginTestingSettings

val playGenerators = Project(id = "play-grpc-generators", file("play-generators"))
.enablePlugins(SbtTwirl, BuildInfoPlugin)
.enablePlugins(SbtTwirl, BuildInfoPlugin, build.play.grpc.NoPublish)
.settings(
libraryDependencies ++= Seq(
Dependencies.Compile.akkaGrpcCodegen,
Expand Down
1 change: 0 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
addSbtPlugin("com.dwijnand" % "sbt-dynver" % "4.1.1")
addSbtPlugin("com.dwijnand" % "sbt-travisci" % "1.2.0")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0")
addSbtPlugin("com.lightbend.akka" % "sbt-paradox-akka" % "0.39")
addSbtPlugin("com.typesafe.sbt" % "sbt-twirl" % "1.5.1")
Expand Down