From 1c2da8799509bec09c2a1939241c87e7af6d0e57 Mon Sep 17 00:00:00 2001 From: Matthias Kurz Date: Tue, 3 May 2022 23:54:36 +0200 Subject: [PATCH 1/5] This is a bit nicer IMHO --- build.sbt | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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(";") +) From fee24345adddc9f076f280a72585c5635a7fb3c8 Mon Sep 17 00:00:00 2001 From: Matthias Kurz Date: Wed, 4 May 2022 00:02:24 +0200 Subject: [PATCH 2/5] Switch to cmd.yml --- .github/workflows/build-test.yml | 12 +++++++----- scripts/test-code.sh | 8 ++++---- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index a955e11f7..db655a76c 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -11,7 +11,7 @@ concurrency: jobs: check-code-style: name: Code Style - uses: playframework/.github/.github/workflows/sbt.yml@v1 + uses: playframework/.github/.github/workflows/cmd.yml@dynamic_matrix with: cmd: sbt validateCode @@ -21,7 +21,7 @@ jobs: check-docs: name: Docs - uses: playframework/.github/.github/workflows/sbt.yml@v1 + uses: playframework/.github/.github/workflows/cmd.yml@dynamic_matrix with: cmd: sbt docs/validateDocs @@ -31,12 +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/contact@playframework.com with: java: >- [ "11", "8" ] - scala: >- - [ "2.12.15", "2.13.8", "3.1.3-RC2" ] + add-dimensions: >- + { + "scala": [ "2.12.15", "2.13.8", "3.1.3-RC2" ] + } cmd: scripts/test-code.sh finish: 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 From d3d9960db46e205773a740c6b781cdad75f5bed8 Mon Sep 17 00:00:00 2001 From: Billy Autrey <40704452+BillyAutrey@users.noreply.github.com> Date: Tue, 3 May 2022 19:52:52 -0500 Subject: [PATCH 3/5] Switches to the right yml file for Tests --- .github/workflows/build-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index db655a76c..31c173bc4 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -31,7 +31,7 @@ jobs: - "check-code-style" - "check-binary-compatibility" - "check-docs" - uses: playframework/.github/.github/workflows/contact@playframework.com + uses: playframework/.github/.github/workflows/cmd.yml@dynamic_matrix with: java: >- [ "11", "8" ] From 7def3d42309ce846fc623bc262b0655488e9453f Mon Sep 17 00:00:00 2001 From: Matthias Kurz Date: Wed, 4 May 2022 16:41:31 +0200 Subject: [PATCH 4/5] java and scala inputs as comma separated string(s) --- .github/workflows/build-test.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 31c173bc4..6685b28b2 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -11,7 +11,7 @@ concurrency: jobs: check-code-style: name: Code Style - uses: playframework/.github/.github/workflows/cmd.yml@dynamic_matrix + uses: playframework/.github/.github/workflows/cmd.yml@cmd-ihostage with: cmd: sbt validateCode @@ -21,7 +21,7 @@ jobs: check-docs: name: Docs - uses: playframework/.github/.github/workflows/cmd.yml@dynamic_matrix + uses: playframework/.github/.github/workflows/cmd.yml@cmd-ihostage with: cmd: sbt docs/validateDocs @@ -31,14 +31,10 @@ jobs: - "check-code-style" - "check-binary-compatibility" - "check-docs" - uses: playframework/.github/.github/workflows/cmd.yml@dynamic_matrix + uses: playframework/.github/.github/workflows/cmd.yml@cmd-ihostage with: - java: >- - [ "11", "8" ] - add-dimensions: >- - { - "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: From 8b2cd06ed9e0315e6cea6a9c9e78bb32d34d5d23 Mon Sep 17 00:00:00 2001 From: Matthias Kurz Date: Fri, 6 May 2022 11:24:39 +0200 Subject: [PATCH 5/5] Switch to v2 --- .github/workflows/build-test.yml | 10 +++++----- .github/workflows/publish.yml | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 6685b28b2..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/cmd.yml@cmd-ihostage + 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/cmd.yml@cmd-ihostage + uses: playframework/.github/.github/workflows/cmd.yml@v2 with: cmd: sbt docs/validateDocs @@ -31,7 +31,7 @@ jobs: - "check-code-style" - "check-binary-compatibility" - "check-docs" - uses: playframework/.github/.github/workflows/cmd.yml@cmd-ihostage + uses: playframework/.github/.github/workflows/cmd.yml@v2 with: java: 11, 8 scala: 2.12.15, 2.13.8, 3.1.3-RC2 @@ -41,4 +41,4 @@ jobs: 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 }}