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

Switch to cmd.yml #757

Merged
merged 5 commits into from
May 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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