123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110 |
- name: Reusable - Test latest deps
- on:
- workflow_call:
- inputs:
- cache-read-only:
- type: boolean
- required: false
- no-build-cache:
- type: boolean
- required: false
- secrets:
- GRADLE_ENTERPRISE_ACCESS_KEY:
- required: false
- permissions:
- contents: read
- jobs:
- test-latest-deps:
- name: testLatestDeps${{ matrix.test-partition }}
- runs-on: ubuntu-latest
- strategy:
- matrix:
- test-partition:
- - 0
- - 1
- - 2
- - 3
- fail-fast: false
- steps:
- - uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- - name: Free disk space
- run: .github/scripts/gha-free-disk-space.sh
- - name: Set up JDK for running Gradle
- uses: actions/setup-java@99b8673ff64fbf99d8d325f52d9a5bdedb8483e9 # v4.2.1
- with:
- distribution: temurin
- java-version: 21
- - name: Increase gradle daemon heap size
- run: |
- sed -i "s/org.gradle.jvmargs=/org.gradle.jvmargs=-Xmx3g /" gradle.properties
- # vaadin tests use pnpm
- - name: Cache pnpm modules
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
- with:
- path: ~/.pnpm-store
- key: ${{ runner.os }}-test-latest-cache-pnpm-modules
- - name: Start deadlock detector
- run: .github/scripts/deadlock-detector.sh
- - name: Setup Gradle
- uses: gradle/actions/setup-gradle@db19848a5fa7950289d3668fb053140cf3028d43 # v3.3.2
- with:
- cache-read-only: ${{ inputs.cache-read-only }}
- # gradle enterprise is used for the build cache
- gradle-home-cache-excludes: caches/build-cache-1
- - name: List tests
- env:
- GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
- run: >
- ./gradlew
- check -x spotlessCheck
- listTestsInPartition
- -PtestPartition=${{ matrix.test-partition }}
- -PtestLatestDeps=true
- - name: Set test tasks
- run: |
- echo "test-tasks=$(cat test-tasks.txt | xargs echo | sed 's/\n/ /g')" >> $GITHUB_ENV
- - name: Test
- env:
- GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
- run: >
- ./gradlew
- ${{ env.test-tasks }}
- -PtestLatestDeps=true
- ${{ inputs.no-build-cache && ' --no-build-cache' || '' }}
- - name: Build scan
- if: ${{ !cancelled() && hashFiles('build-scan.txt') != '' }}
- run: cat build-scan.txt
- - name: Upload deadlock detector artifacts if any
- if: failure()
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
- with:
- name: deadlock-detector-test-latest-${{ matrix.test-java-version }}-${{ matrix.vm }}-${{ matrix.test-partition }}
- path: /tmp/deadlock-detector-*
- if-no-files-found: ignore
- - name: Upload jvm crash dump files if any
- if: failure()
- uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3
- with:
- name: javacore-test-latest-${{ matrix.test-java-version }}-${{ matrix.test-partition }}
- path: |
- **/hs_err_pid*.log
- **/javacore.*.txt
- **/Snap.*.trc
- **/core.*.dmp
- **/jitdump.*.dmp
- if-no-files-found: ignore
|