Skip to content

Commit

Permalink
Merge pull request #221 from mkurz/GHA
Browse files Browse the repository at this point in the history
Switch to GitHub actions
  • Loading branch information
mkurz authored May 9, 2022
2 parents 187b204 + f8602cd commit 2f56adb
Show file tree
Hide file tree
Showing 5 changed files with 79 additions and 65 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Check

on:
pull_request:

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/cmd.yml@v2
with:
cmd: sbt validateCode

check-binary-compatibility:
name: Binary Compatibility
uses: playframework/.github/.github/workflows/binary-check.yml@v2

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

tests:
name: Tests
needs: # Waiting more lightweight checks
- "check-code-style"
- "check-binary-compatibility"
- "check-docs"
uses: playframework/.github/.github/workflows/cmd.yml@v2
with:
java: 11, 8
scala: 2.12.15, 2.13.8, 3.1.2
cmd: sbt ++$MATRIX_SCALA test

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

on:
push:
branches: # Snapshots
- main
tags: ["*"] # Releases

jobs:
publish-artifacts:
name: Publish / Artifacts
uses: playframework/.github/.github/workflows/publish.yml@v2
secrets: inherit
15 changes: 12 additions & 3 deletions .mergify.yml
Original file line number Diff line number Diff line change
@@ -1,19 +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:
- status-success=Travis CI - Pull Request
- status-success=typesafe-cla-validator
- 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:
merge:
queue:
method: merge
name: default

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

This file was deleted.

10 changes: 10 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,13 @@ lazy val cachecontrol = (project in file("."))
)
}
)

addCommandAlias(
"validateCode",
List(
"headerCheckAll",
"scalafmtSbtCheck",
"scalafmtCheckAll",
"scalastyle",
).mkString(";")
)

0 comments on commit 2f56adb

Please sign in to comment.