diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index a955e11f7..97ceae1ec 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -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 @@ -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 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c61d18a6f..5a56ea2f8 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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 }} diff --git a/build.sbt b/build.sbt index b4c31017c..bb974353f 100644 --- a/build.sbt +++ b/build.sbt @@ -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(";") +) diff --git a/scripts/test-code.sh b/scripts/test-code.sh index 7a9e83117..0d2a9bf24 100755 --- a/scripts/test-code.sh +++ b/scripts/test-code.sh @@ -1,9 +1,9 @@ #!/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: @@ -11,5 +11,5 @@ case "$SCALA_VERSION" in # [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