1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- 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-indy:
- name: testIndy${{ matrix.test-partition }}
- if: ${{ contains(github.event.pull_request.labels.*.name, 'test indy') }}
- runs-on: ubuntu-latest
- strategy:
- matrix:
- test-partition:
- - 0
- - 1
- - 2
- - 3
- fail-fast: false
- steps:
- - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- - 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-file: .java-version
- - name: Increase gradle daemon heap size
- run: |
- sed -i "s/org.gradle.jvmargs=/org.gradle.jvmargs=-Xmx3g /" gradle.properties
- # vaadin 14 tests fail with node 18
- - name: Set up Node
- uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
- with:
- node-version: 16
- # 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: Setup Gradle
- uses: gradle/actions/setup-gradle@d9336dac04dea2507a617466bc058a3def92b18b # v3.4.0
- 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 }}
- - 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 }}
- -PtestIndy=true
- ${{ inputs.no-build-cache && ' --no-build-cache' || '' }}
- - name: Build scan
- if: ${{ !cancelled() && hashFiles('build-scan.txt') != '' }}
- run: cat build-scan.txt
|