Skip to content

Commit

Permalink
[skip travis] CI with GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ihostage committed Feb 2, 2022
1 parent 78bcdb4 commit a58e6a4
Show file tree
Hide file tree
Showing 3 changed files with 115 additions and 2 deletions.
99 changes: 99 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Pull Requests

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: Check / Code Style # Scalafmt, Javafmt, File Headers (Test, IT, Microbench), Akka versions
uses: ihostage/.github-play/.github/workflows/sbt.yml@sharable-actions
with:
cmd: sbt validateCode

check-binary-compatibility:
name: Check / Binary Compatibility
uses: ihostage/.github-play/.github/workflows/binary-check.yml@sharable-actions

check-docs:
name: Check / Docs
uses: ihostage/.github-play/.github/workflows/sbt.yml@sharable-actions
with:
cmd: |
cd documentation
sbt evaluateSbtFiles validateDocs headerCheck Test/headerCheck +scalafmtCheckAll scalafmtSbtCheck javafmtCheckAll
./addMarkdownCopyright
publish-local:
name: Publish Local
needs: # Waiting more lightweight checks
- "check-code-style"
- "check-binary-compatibility"
- "check-docs"
uses: ihostage/.github-play/.github/workflows/sbt.yml@sharable-actions
with:
cmd: |
echo "HOME: $HOME"
rm -rf ~/.ivy2/local
sbt crossScalaVersions crossSbtVersions +publishLocal
ls -la ~/.ivy2/local/com.typesafe.play
cache-path: ~/.ivy2/local/com.typesafe.play
cache-key: play-${{ github.sha }}

check-microbenchmarks:
name: Check / Microbenchmarks
if: ${{ false }} # TODO: enable
needs: # Waiting more lightweight checks
- "check-code-style"
- "check-binary-compatibility"
- "check-docs"
uses: ihostage/.github-play/.github/workflows/sbt.yml@sharable-actions
with:
cmd: sbt Play-Microbenchmark/jmh:run -i 1 -wi 0 -f 1 -t 1 -foe=true

tests:
name: Check / Tests
needs: # Waiting more lightweight checks
- "check-code-style"
- "check-binary-compatibility"
- "check-docs"
uses: ihostage/.github-play/.github/workflows/sbt-matrix.yml@sharable-actions
with:
java: >-
[ "11" ]
scala: >-
[ "2.13.8" ]
cmd: sbt ++$SCALA_VERSION test

it-tests:
name: Check / Integration Tests
needs: # Waiting more lightweight checks
- "check-code-style"
- "check-binary-compatibility"
- "check-docs"
uses: ihostage/.github-play/.github/workflows/sbt-matrix.yml@sharable-actions
with:
java: >-
[ "11" ]
scala: >-
[ "2.13.8" ]
cmd: sbt ++$SCALA_VERSION Play-Integration-Test/It/test

docs-tests:
name: Check / Docs Tests
if: ${{ false }} # TODO: enable
needs: # Waiting more lightweight checks
- "check-code-style"
- "check-binary-compatibility"
- "check-docs"
uses: ihostage/.github-play/.github/workflows/sbt-matrix.yml@sharable-actions
with:
java: >-
[ "11" ]
scala: >-
[ "2.13.8" ]
cmd: cd documentation && sbt ++$SCALA_VERSION test
14 changes: 14 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -476,3 +476,17 @@ lazy val PlayFramework = Project("Play-Framework", file("."))
Release.settings
)
.aggregate((userProjects ++ nonUserProjects): _*)

addCommandAlias(
"validateCode",
List(
"+scalafmtCheckAll",
"scalafmtSbtCheck",
"javafmtCheckAll",
"+headerCheck",
"+Test/headerCheck",
"+Play-Integration-Test/It/headerCheck",
"+Play-Microbenchmark/Test/headerCheck",
// "+checkAkkaModuleVersions" TODO
).mkString(";")
)
4 changes: 2 additions & 2 deletions scripts/scriptLib
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,10 @@ javafmtValidation() {

start debug-env "SHOW FILES RELEVANT FOR THIS JOB AND ALL ENV VARIABLES"
echo "$ cat /etc/sbt/jvmopts"
cat /etc/sbt/jvmopts
[ -f /etc/sbt/jvmopts ] && cat /etc/sbt/jvmopts
echo ""
echo "$ cat /etc/sbt/sbtopts"
cat /etc/sbt/sbtopts
[ -f /etc/sbt/sbtopts ] && cat /etc/sbt/sbtopts
echo ""
echo "$ env"
env
Expand Down

0 comments on commit a58e6a4

Please sign in to comment.