62 lines
1.9 KiB
YAML
62 lines
1.9 KiB
YAML
name: Reusable - Test latest deps
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
skip:
|
|
type: boolean
|
|
required: false
|
|
cache-read-only:
|
|
type: boolean
|
|
required: false
|
|
no-build-cache:
|
|
type: boolean
|
|
required: false
|
|
secrets:
|
|
GRADLE_ENTERPRISE_ACCESS_KEY:
|
|
required: false
|
|
GE_CACHE_USERNAME:
|
|
required: false
|
|
GE_CACHE_PASSWORD:
|
|
required: false
|
|
|
|
jobs:
|
|
test-latest-deps:
|
|
# the condition is on the steps below instead of here on the job, because skipping the job
|
|
# causes the job to show up as canceled in the GitHub UI which prevents the build section from
|
|
# collapsing when everything (else) is green
|
|
#
|
|
# and the name is updated when the steps below are skipped which makes what's happening clearer
|
|
# in the GitHub UI
|
|
name: testLatestDeps${{ inputs.skip && ' (skipped)' || '' }}
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Set up JDK for running Gradle
|
|
if: ${{ !inputs.skip }}
|
|
uses: actions/setup-java@v2
|
|
with:
|
|
distribution: temurin
|
|
java-version: 17
|
|
|
|
# vaadin tests use pnpm
|
|
- name: Cache pnpm modules
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ~/.pnpm-store
|
|
key: ${{ runner.os }}-test-latest-cache-pnpm-modules
|
|
|
|
- name: Test
|
|
if: ${{ !inputs.skip }}
|
|
uses: gradle/gradle-build-action@v2
|
|
env:
|
|
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
|
|
GE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }}
|
|
GE_CACHE_PASSWORD: ${{ secrets.GE_CACHE_PASSWORD }}
|
|
with:
|
|
arguments: test -PtestLatestDeps=true ${{ inputs.no-build-cache && ' --no-build-cache' || '' }}
|
|
cache-read-only: ${{ inputs.cache-read-only }}
|
|
# gradle enterprise is used for the build cache
|
|
gradle-home-cache-excludes: caches/build-cache-1
|