-
Notifications
You must be signed in to change notification settings - Fork 919
86 lines (77 loc) · 2.49 KB
/
reusable-test-latest-deps.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
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
GE_CACHE_USERNAME:
required: false
GE_CACHE_PASSWORD:
required: false
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@v4
- name: Free disk space
run: .github/scripts/gha-free-disk-space.sh
- name: Set up JDK for running Gradle
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17.0.6
- 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@v3
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-test-latest-cache-pnpm-modules
- name: List tests
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
GE_CACHE_USERNAME: ${{ secrets.GE_CACHE_USERNAME }}
GE_CACHE_PASSWORD: ${{ secrets.GE_CACHE_PASSWORD }}
uses: gradle/gradle-build-action@v2
with:
arguments: >
check -x spotlessCheck
listTestsInPartition
-PtestPartition=${{ matrix.test-partition }}
-PtestLatestDeps=true
cache-read-only: true
- name: Set test tasks
run: |
echo "test-tasks=$(cat test-tasks.txt | xargs echo | sed 's/\n/ /g')" >> $GITHUB_ENV
- name: Test
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: >
${{ env.test-tasks }}
-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