Skip to content

Commit

Permalink
Merge pull request #757 from mkurz/cmd.yml
Browse files Browse the repository at this point in the history
Switch to cmd.yml
  • Loading branch information
mergify[bot] authored May 6, 2022
2 parents 34bcb3a + 8b2cd06 commit b446f4e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 15 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ concurrency:
jobs:
check-code-style:
name: Code Style
uses: playframework/.github/.github/workflows/sbt.yml@v1
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@v1
uses: playframework/.github/.github/workflows/binary-check.yml@v2

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

Expand All @@ -31,16 +31,14 @@ jobs:
- "check-code-style"
- "check-binary-compatibility"
- "check-docs"
uses: playframework/.github/.github/workflows/sbt-matrix.yml@v1
uses: playframework/.github/.github/workflows/cmd.yml@v2
with:
java: >-
[ "11", "8" ]
scala: >-
[ "2.12.15", "2.13.8", "3.1.3-RC2" ]
java: 11, 8
scala: 2.12.15, 2.13.8, 3.1.3-RC2
cmd: scripts/test-code.sh

finish:
name: Finish
needs: # Should be last
- "tests"
uses: playframework/.github/.github/workflows/rtm.yml@v1
uses: playframework/.github/.github/workflows/rtm.yml@v2
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
publish-artifacts:
name: Publish / Artifacts
uses: playframework/.github/.github/workflows/publish.yml@v1
uses: playframework/.github/.github/workflows/publish.yml@v2
secrets:
username: ${{ secrets.SONATYPE_USERNAME }}
password: ${{ secrets.SONATYPE_PASSWORD }}
Expand Down
9 changes: 8 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -304,4 +304,11 @@ lazy val docs = project
.settings(commonSettings)
.dependsOn(`play-jsonJVM`)

addCommandAlias("validateCode", "headerCheckAll; scalafmtSbtCheck; scalafmtCheckAll")
addCommandAlias(
"validateCode",
List(
"headerCheckAll",
"scalafmtSbtCheck",
"scalafmtCheckAll",
).mkString(";")
)
8 changes: 4 additions & 4 deletions scripts/test-code.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
#!/usr/bin/env bash

echo SCALA_VERSION=$SCALA_VERSION
sbt -DscalaJSStage=full ++$SCALA_VERSION test publishLocal || exit 1
echo MATRIX_SCALA=$MATRIX_SCALA
sbt -DscalaJSStage=full ++$MATRIX_SCALA test publishLocal || exit 1

case "$SCALA_VERSION" in
case "$MATRIX_SCALA" in
3.*) echo "SKIPPING docs/test" ;;
# ^ because there is no play-docs for Scala 3
# and we can't use play-docs_2.13 because then:
# [error] Modules were resolved with conflicting cross-version suffixes in ProjectRef(uri("file:/d/play-json/"), "docs"):
# [error] com.typesafe.play:play-functional _2.13, _3.0.0-M3
# [error] com.typesafe.play:play-json _2.13, _3.0.0-M3

*) sbt ++$SCALA_VERSION docs/test || exit 2 ;;
*) sbt ++$MATRIX_SCALA docs/test || exit 2 ;;
esac

0 comments on commit b446f4e

Please sign in to comment.