Skip to content

[2.9.x] Document flag to use self-signed certificates in DEV and when staging (backport #12563) by @mkurz #3537

[2.9.x] Document flag to use self-signed certificates in DEV and when staging (backport #12563) by @mkurz

[2.9.x] Document flag to use self-signed certificates in DEV and when staging (backport #12563) by @mkurz #3537

Workflow file for this run

name: Check
on:
pull_request: # Check Pull Requests
push:
branches:
- 2.9.x # Check branch after merge
schedule:
- cron: "0 4 * * *" # Nightly build (@daily)
concurrency:
# Only run once for latest commit per ref and cancel other (previous) runs.
group: ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read # for checkout
jobs:
extra-vars:
name: Extra variables
runs-on: ubuntu-20.04
outputs:
akka_version_opts: ${{ steps.akka-snapshots.outputs.akka_opts }}
akka_http_version_opts: ${{ steps.akka-snapshots.outputs.akka_http_opts }}
steps:
- id: akka-snapshots
run: |
if [ "$GITHUB_EVENT_NAME" = "schedule" ]; then
AKKA_VERSION=$(curl -s https://oss.sonatype.org/content/repositories/snapshots/com/typesafe/akka/akka-actor_2.13/ | grep -oEi '2\.6\.[0-9]+\+[RCM0-9]+-[0-9a-f]{8}-SNAPSHOT' | sort -V | tail -n 1)
AKKA_HTTP_VERSION=$(curl -s https://oss.sonatype.org/content/repositories/snapshots/com/typesafe/akka/akka-http-core_2.13/ | grep -oEi '10\.2\.[0-9]+\+[RCM0-9]+-[0-9a-f]{8}-SNAPSHOT' | sort -V | tail -n 1)
echo "akka_opts=-Dakka.version=$AKKA_VERSION" >> $GITHUB_OUTPUT
# We can't use the latest akka-http 10.2.x SNAPSHOT anymore because it's not compatible with akka 2.6 anymore
#echo "akka_http_opts=-Dakka.http.version=$AKKA_HTTP_VERSION" >> $GITHUB_OUTPUT
else
echo "akka_opts=" >> $GITHUB_OUTPUT
echo "akka_http_opts=" >> $GITHUB_OUTPUT
fi
prefetch-for-caching:
name: Prefetch dependencies and JVMs for caching
uses: playframework/.github/.github/workflows/cmd.yml@v3
with:
cmd: |
if [ "$CACHE_HIT_COURSIER" = "false" ]; then
sbt +update # Runs with adoptium:8 (default)
# sbt --sbt-version 1.9.9 +update # If we run scripted tests with multiple sbt versions, we could init that sbt installs here
sbt +mimaPreviousClassfiles # Fetches previous artifacts
cd documentation && sbt +update && cd .. # Fetches dependencies of the documentation project
sbt -java-home `cs java-home --jvm adoptium:11` exit # Init sbt with new JVM that will be downloaded
sbt -java-home `cs java-home --jvm adoptium:17` exit # Init sbt with new JVM that will be downloaded
fi
check-code-style:
name: Code Style # scalafmt, javafmt, file headers, akka version check
needs:
- "extra-vars"
- "prefetch-for-caching"
uses: playframework/.github/.github/workflows/cmd.yml@v3
with:
cmd: sbt "${{needs.extra-vars.outputs.akka_version_opts}}" "${{needs.extra-vars.outputs.akka_http_version_opts}}" validateCode
check-binary-compatibility:
name: Binary Compatibility
needs: "prefetch-for-caching"
uses: playframework/.github/.github/workflows/binary-check.yml@v3
check-code-style-docs:
name: Code Style Docs
needs: "prefetch-for-caching"
uses: playframework/.github/.github/workflows/cmd.yml@v3
with:
cmd: |
cd documentation
sbt validateCode
publish-local:
name: Publish Local
needs:
- "extra-vars"
- "check-code-style"
- "check-binary-compatibility"
- "check-code-style-docs"
uses: playframework/.github/.github/workflows/cmd.yml@v3
with:
java: 17, 11
exclude: >-
[
{ "java": "${{ github.event_name == 'schedule' || '17' }}" }
]
cmd: |
rm -rf ~/.ivy2/local
sbt "${{needs.extra-vars.outputs.akka_version_opts}}" "${{needs.extra-vars.outputs.akka_http_version_opts}}" crossScalaVersions crossSbtVersions +publishLocal
cache-path: ~/.ivy2/local/com.typesafe.play
cache-key: play-published-local-jdk{0}-${{ github.sha }}-${{ github.event_name != 'schedule' || github.run_id }}
tests:
name: Tests
if: "!contains(github.event.pull_request.labels.*.name, 'ci:skip-tests')"
needs:
- "extra-vars"
- "check-code-style"
- "check-binary-compatibility"
- "check-code-style-docs"
uses: playframework/.github/.github/workflows/cmd.yml@v3
with:
java: 17, 11
scala: 2.13.x, 3.x
add-dimensions: >-
{
"sbt_test_task": [ "test", "Play-Microbenchmark/jmh:run -i 1 -wi 0 -f 1 -t 1 -foe=true" ]
}
exclude: >-
[
{ "java": "${{ github.event_name == 'schedule' || '17' }}" },
{ "sbt_test_task": "${{ github.event_name == 'schedule' || 'Play-Microbenchmark/jmh:run -i 1 -wi 0 -f 1 -t 1 -foe=true' }}" }
]
cmd: >-
if [ "$MATRIX_JAVA" = 17 ]; then
export JAVA_TOOL_OPTIONS="$JAVA_TOOL_OPTIONS --add-exports=java.base/sun.security.x509=ALL-UNNAMED";
fi;
if [ "$MATRIX_SCALA" = "3.x" ]; then
export PLAY_SCALA3_TESTS="-Dscala3Tests=true"
fi;
sbt "${{needs.extra-vars.outputs.akka_version_opts}}" "${{needs.extra-vars.outputs.akka_http_version_opts}}" $PLAY_SCALA3_TESTS ++$MATRIX_SCALA "$MATRIX_SBT_TEST_TASK"
docs-tests:
name: Docs Tests
if: "!contains(github.event.pull_request.labels.*.name, 'ci:skip-docs-tests')"
needs:
- "extra-vars"
- "check-code-style"
- "check-binary-compatibility"
- "check-code-style-docs"
uses: playframework/.github/.github/workflows/cmd.yml@v3
with:
java: 17, 11
scala: 2.13.x, 3.x
exclude: >-
[
{ "java": "${{ github.event_name == 'schedule' || '17' }}" }
]
cmd: >-
if [ "$MATRIX_SCALA" = "3.x" ]; then
export PLAY_SCALA3_TESTS="-Dscala3Tests=true"
fi;
cd documentation && sbt "${{needs.extra-vars.outputs.akka_version_opts}}" "${{needs.extra-vars.outputs.akka_http_version_opts}}" $PLAY_SCALA3_TESTS ++$MATRIX_SCALA test
scripted-tests:
name: Scripted Tests
if: "!contains(github.event.pull_request.labels.*.name, 'ci:skip-scripted-tests')"
needs:
- "extra-vars"
- "publish-local"
uses: playframework/.github/.github/workflows/cmd.yml@v3
with:
java: 17, 11
scala: 2.13.x, 3.x
add-dimensions: >-
{
"sbt": [ "1.9.9" ],
"sbt_steps": [ "*1of3", "*2of3", "*3of3" ]
}
exclude: >-
[
{ "java": "${{ github.event_name == 'schedule' || '17' }}" }
]
cmd: >-
if [ "$MATRIX_JAVA" = 17 ]; then
export JAVA_TOOL_OPTIONS="$JAVA_TOOL_OPTIONS --add-exports=java.base/sun.security.x509=ALL-UNNAMED";
fi;
export SCALA_CROSS_VERSIONS=`sbt -batch -error 'print Play/crossScalaVersions' | sed "s/\*//g" | xargs`;
sbt "${{needs.extra-vars.outputs.akka_version_opts}}" "${{needs.extra-vars.outputs.akka_http_version_opts}}" "
project Sbt-Plugin;
set scriptedSbt := \"$MATRIX_SBT\";
set scriptedLaunchOpts += \"-Dscala.version=$MATRIX_SCALA\";
set scriptedLaunchOpts += \"-Dscala.crossversions=$SCALA_CROSS_VERSIONS\";
show scriptedSbt;
show scriptedLaunchOpts;
scripted play-sbt-plugin/$MATRIX_SBT_STEPS
"
cache-path: ~/.ivy2/local/com.typesafe.play
cache-key: play-published-local-jdk{0}-${{ github.sha }}-${{ github.event_name != 'schedule' || github.run_id }}
finish:
name: Finish
if: github.event_name == 'pull_request'
needs: # Should be last
- "tests"
- "docs-tests"
- "scripted-tests"
uses: playframework/.github/.github/workflows/rtm.yml@v3