Fix SwitchOnFirst
hanging subscription
#2372
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: {} | |
permissions: read-all | |
jobs: | |
preliminary: | |
name: preliminary sanity checks | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4 | |
with: | |
fetch-depth: 0 #needed by spotless | |
- name: Download JDK 9 | |
if: contains('3.6.x', github.base_ref) | |
run: ${GITHUB_WORKSPACE}/.github/setup.sh | |
shell: bash | |
- name: Setup JDK 9 | |
if: contains('3.6.x', github.base_ref) | |
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # tag=v3 | |
with: | |
distribution: 'jdkfile' | |
java-version: 9.0.4 | |
jdkFile: /opt/openjdk/java9/OpenJDK9U-jdk_x64_linux_hotspot_9.0.4_11.tar.gz | |
- name: Setup JDK 21 | |
if: contains('main 3.6.x', github.base_ref) | |
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # tag=v3 | |
with: | |
distribution: 'temurin' | |
java-version: 21 | |
- name: Setup JDK 8 | |
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # tag=v3 | |
with: | |
distribution: 'temurin' | |
java-version: 8 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 | |
- name: spotless (license header) | |
if: always() | |
run: ./gradlew spotlessCheck -PspotlessFrom=origin/${{ github.base_ref }} | |
- name: api compatibility | |
if: always() | |
run: ./gradlew japicmp | |
- name: how to fix | |
if: failure() | |
# the foreground (38;5) color code 208 is orange. we also have bold, white bg (38;5;0;48;5;255m), white fg on black bg... | |
run: | | |
echo -e "\n\033[38;5;0;48;5;208m \u001b[1m How to deal with errors in preliminary job: \u001b[0m\033[0m" | |
echo "(Have a look at the steps above to see what failed exactly)" | |
echo -e "\n - \u001b[1mSpotless (license headers)\u001b[0m failures on touched java files \033[38;5;255;48;5;0m\u001b[1mcan be automatically fixed by running\u001b[0m:" | |
echo -e " \033[38;5;0;48;5;255m ./gradlew spotlessApply \033[0m" | |
echo -e "\n - \u001b[1mAPI Compatibility\u001b[0m failures should be considered carefully and \033[38;5;255;48;5;0m\u001b[1mdiscussed with maintainers in the PR\u001b[0m" | |
echo " If there are failures, the detail should be available in the step's log:" | |
echo -e " Look for the \033[38;5;0;48;5;255m API compatibility failures \033[0m block(s)." | |
echo " Alternatively, locally run the following command to get access to the full report:" | |
echo -e " \033[38;5;0;48;5;255m ./gradlew japicmp \033[0m" | |
echo "" | |
exit -1 | |
run-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
test-type: | |
- type: core | |
arguments: ":reactor-core:test --no-daemon" | |
- type: core-java21 | |
arguments: ":reactor-core:java21Test --no-daemon" | |
- type: core-java9 | |
arguments: ":reactor-core:java9Test --no-daemon" | |
- type: other | |
arguments: "check -x :reactor-core:test -x :reactor-core:java21Test -x :reactor-core:java9Test -x spotlessCheck -Pjcstress.mode=sanity --no-daemon" | |
name: ${{ matrix.test-type.type }} tests | |
needs: preliminary | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # tag=v4 | |
- name: Download Java 9 | |
if: contains('3.6.x', github.base_ref) | |
run: ${GITHUB_WORKSPACE}/.github/setup.sh | |
shell: bash | |
- name: Setup Java 9 | |
if: contains('3.6.x', github.base_ref) | |
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # tag=v3 | |
with: | |
distribution: 'jdkfile' | |
java-version: 9.0.4 | |
jdkFile: /opt/openjdk/java9/OpenJDK9U-jdk_x64_linux_hotspot_9.0.4_11.tar.gz | |
- name: Setup Java 21 | |
if: contains('main 3.6.x', github.base_ref) | |
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # tag=v3 | |
with: | |
distribution: 'temurin' | |
java-version: 21 | |
- name: Setup Java 8 | |
uses: actions/setup-java@8df1039502a15bceb9433410b1a100fbe190c53b # tag=v3 | |
with: | |
distribution: 'temurin' | |
java-version: 8 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@d156388eb19639ec20ade50009f3d199ce1e2808 | |
- name: Run Gradle Tests | |
run: ./gradlew ${{ matrix.test-type.arguments }} |