reusable-smoke-test.yml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. name: Reusable - Smoke test
  2. on:
  3. workflow_call:
  4. inputs:
  5. skip-windows:
  6. type: boolean
  7. required: false
  8. cache-read-only:
  9. type: boolean
  10. required: false
  11. no-build-cache:
  12. type: boolean
  13. required: false
  14. secrets:
  15. GRADLE_ENTERPRISE_ACCESS_KEY:
  16. required: false
  17. GE_CACHE_USERNAME:
  18. required: false
  19. GE_CACHE_PASSWORD:
  20. required: false
  21. jobs:
  22. smoke-test:
  23. runs-on: ${{ matrix.os }}
  24. strategy:
  25. matrix:
  26. os:
  27. - windows-2019
  28. - ubuntu-latest
  29. smoke-test-suite:
  30. - jetty
  31. - liberty
  32. - payara
  33. - tomcat
  34. - tomee
  35. - websphere
  36. - wildfly
  37. - other
  38. exclude:
  39. - os: ${{ inputs.skip-windows && 'windows-2019' || '' }}
  40. - os: windows-2019
  41. smoke-test-suite: websphere
  42. fail-fast: false
  43. steps:
  44. - name: Support long paths
  45. run: git config --system core.longpaths true
  46. if: matrix.os == 'windows-2019'
  47. - uses: actions/checkout@v3
  48. - name: Set up JDK for running Gradle
  49. uses: actions/setup-java@v3
  50. with:
  51. distribution: temurin
  52. java-version: 17
  53. - name: Set up Gradle cache
  54. uses: gradle/gradle-build-action@v2
  55. with:
  56. # only push cache for one matrix option per OS since github action cache space is limited
  57. cache-read-only: ${{ inputs.cache-read-only || matrix.smoke-test-suite != 'tomcat' }}
  58. # gradle enterprise is used for the build cache
  59. gradle-home-cache-excludes: caches/build-cache-1
  60. - name: Build
  61. env:
  62. GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
  63. GE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }}
  64. GE_CACHE_PASSWORD: ${{ secrets.GE_CACHE_PASSWORD }}
  65. # running suite "none" compiles everything needed by smoke tests without executing any tests
  66. run: ./gradlew :smoke-tests:test -PsmokeTestSuite=none --no-daemon ${{ inputs.no-build-cache && ' --no-build-cache' || '' }}
  67. - name: Test
  68. env:
  69. GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
  70. GE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }}
  71. GE_CACHE_PASSWORD: ${{ secrets.GE_CACHE_PASSWORD }}
  72. run: ./gradlew :smoke-tests:test -PsmokeTestSuite=${{ matrix.smoke-test-suite }}${{ inputs.no-build-cache && ' --no-build-cache' || '' }}
  73. - name: Upload jvm crash dump files if any
  74. if: always()
  75. uses: actions/upload-artifact@v3
  76. with:
  77. name: javacore-smoke-test-${{ matrix.smoke-test-suite }}-${{ matrix.os }}
  78. # we expect crash dumps either in root director or in smoke-tests
  79. # not using **/ here because actions/upload-artifact fails with long paths https://github.com/actions/upload-artifact/issues/309
  80. path: |
  81. hs_err_pid*.log
  82. smoke-tests/hs_err_pid*.log
  83. javacore.*.txt
  84. smoke-tests/javacore.*.txt
  85. Snap.*.trc
  86. smoke-tests/Snap.*.trc
  87. core.*.dmp
  88. smoke-tests/core.*.dmp
  89. jitdump.*.dmp
  90. smoke-tests/jitdump.*.dmp
  91. if-no-files-found: ignore