Skip to content

Commit 62efff8

Browse files
committed
merge main
Signed-off-by: wind57 <[email protected]>
2 parents 8e7ad20 + 6228120 commit 62efff8

File tree

127 files changed

+3903
-692
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+3903
-692
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ updates:
1515
schedule:
1616
interval: daily
1717
target-branch: main
18-
# ignore:
19-
# # only upgrade by minor or patch
20-
# - dependency-name: "*"
21-
# update-types:
22-
# - version-update:semver-major
23-
# - version-update:semver-minor
18+
ignore:
19+
# only upgrade by minor or patch
20+
- dependency-name: "*"
21+
update-types:
22+
- version-update:semver-major
23+
- version-update:semver-minor
2424
- package-ecosystem: maven
2525
directory: /
2626
schedule:

.github/workflows/composites/cache/action.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
name: cache
22
description: cache
3+
inputs:
4+
jdk-version:
5+
description: 'Java version to use in cache key'
6+
required: true
7+
default: '17'
38
runs:
49
using: "composite"
510
steps:
@@ -10,6 +15,6 @@ runs:
1015
action: buildjet/cache@v3
1116
with: |
1217
path: ~/.m2/repository
13-
key: ${{ runner.os }}-cache-${{ env.BRANCH_NAME }}-${{ hashFiles('**/pom.xml') }}
14-
restore-keys: ${{ runner.os }}-cache-${{ env.BRANCH_NAME }}-${{ hashFiles('**/pom.xml') }}
18+
key: ${{ runner.os }}-cache-jdk${{ inputs.jdk-version }}-${{ env.BRANCH_NAME }}-${{ hashFiles('**/pom.xml') }}
19+
restore-keys: ${{ runner.os }}-cache-jdk${{ inputs.jdk-version }}-${{ env.BRANCH_NAME }}-${{ hashFiles('**/pom.xml') }}
1520

.github/workflows/composites/matrix-bounds-on-test-times-cache-hit/action.yaml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@
1313

1414
name: matrix bounds on test times cache hit
1515
description: matrix bounds on test times cache hit
16+
inputs:
17+
jdk-version:
18+
description: 'Java version to use in artifact name'
19+
required: false
20+
default: '17'
21+
branch:
22+
description: 'Branch name to use in artifact name'
23+
required: false
24+
default: 'main'
1625
runs:
1726
using: "composite"
1827

@@ -29,6 +38,12 @@ runs:
2938
shell: bash
3039
run: cat /tmp/sorted.txt
3140

41+
- name: download tests
42+
uses: actions/download-artifact@v4
43+
with:
44+
name: tests-${{ inputs.branch }}-jdk${{ inputs.jdk-version }}.txt
45+
path: /tmp/
46+
3247
- name: compute matrix steps
3348
shell: bash
3449
run: |
@@ -119,11 +134,11 @@ runs:
119134
- name: upload test with times
120135
uses: actions/upload-artifact@v4
121136
with:
122-
name: tests-with-times-sorted.txt
137+
name: tests-with-times-sorted-${{ inputs.branch }}-jdk${{ inputs.jdk-version }}.txt
123138
path: /tmp/tests-with-times-sorted.txt
124139

125140
- name: upload test without times
126141
uses: actions/upload-artifact@v4
127142
with:
128-
name: tests-without-times.txt
143+
name: tests-without-times-${{ inputs.branch }}-jdk${{ inputs.jdk-version }}.txt
129144
path: /tmp/tests-without-times.txt

.github/workflows/composites/maven-build-with-dry-run-for-tests/action.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
name: maven-build-with-dry-run-for-tests
22
description: maven-build-with-dry-run-for-tests
3+
inputs:
4+
jdk-version:
5+
description: 'Java version to use in artifact name'
6+
required: false
7+
default: '17'
8+
branch:
9+
description: 'Branch name to use in artifact name'
10+
required: false
11+
default: 'main'
312
runs:
413
using: "composite"
514
steps:
@@ -34,6 +43,6 @@ runs:
3443
- name: upload test
3544
uses: actions/upload-artifact@v4
3645
with:
37-
name: tests.txt
46+
name: tests-${{ inputs.branch }}-jdk${{ inputs.jdk-version }}.txt
3847
path: /tmp/tests.txt
3948

.github/workflows/composites/pre-test-actions/action.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@
33

44
name: pre-test-actions
55
description: pre-test-actions
6+
inputs:
7+
jdk-version:
8+
description: 'Java version to use in artifact name'
9+
required: false
10+
default: '17'
11+
branch:
12+
description: 'Branch name to use in artifact name'
13+
required: false
14+
default: 'main'
615
runs:
716
using: "composite"
817

@@ -17,14 +26,16 @@ runs:
1726

1827
- name: cache local maven repository
1928
uses: ./.github/workflows/composites/cache
29+
with:
30+
jdk-version: ${{ inputs.jdk-version }}
2031

2132
- name: restore common images
2233
uses: ./.github/workflows/composites/restore-docker-images
2334

2435
- name: build project
2536
shell: bash
2637
run: |
27-
./mvnw clean install -P 'run-on-github-actions' -Dspring-boot.build-image.skip=true -DskipITs -DskipTests -T1C -U -B -q
38+
./mvnw clean install -Dspring-boot.build-image.skip=true -DskipITs -DskipTests -T1C -U -B -q
2839
2940
- name: build controllers project
3041
uses: ./.github/workflows/composites/build-controllers-project
@@ -35,7 +46,7 @@ runs:
3546
- name: download tests
3647
uses: actions/download-artifact@v4
3748
with:
38-
name: tests.txt
49+
name: tests-${{ inputs.branch }}-jdk${{ inputs.jdk-version }}.txt
3950
path: /tmp
4051

4152

.github/workflows/composites/run-and-save-test-times-when-cache-missing/action.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,15 @@
66

77
name: run and save test times when cache missing
88
description: run and save test times when cache missing
9+
inputs:
10+
jdk-version:
11+
description: 'Java version to use in artifact name'
12+
required: false
13+
default: '17'
14+
branch:
15+
description: 'Branch name to use in artifact name'
16+
required: false
17+
default: 'main'
918
runs:
1019
using: "composite"
1120

@@ -70,7 +79,7 @@ runs:
7079
- name: upload individual tests
7180
uses: actions/upload-artifact@v4
7281
with:
73-
name: test_times_${{ env.CURRENT_INDEX }}.txt
82+
name: test_times_${{ inputs.branch }}_jdk${{ inputs.jdk-version }}_${{ env.CURRENT_INDEX }}.txt
7483
path: /tmp/test_times_${{ env.CURRENT_INDEX }}.txt
7584

7685

.github/workflows/composites/run-and-save-test-times-when-cache-present/action.yaml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
name: run and save test times when cache present
22
description: run and save test times when cache present
3+
inputs:
4+
jdk-version:
5+
description: 'Java version to use in artifact name'
6+
required: false
7+
default: '17'
8+
branch:
9+
description: 'Branch name to use in artifact name'
10+
required: false
11+
default: 'main'
312
runs:
413
using: "composite"
514

@@ -8,13 +17,13 @@ runs:
817
- name: download tests with times
918
uses: actions/download-artifact@v4
1019
with:
11-
name: tests-with-times-sorted.txt
20+
name: tests-with-times-sorted-${{ inputs.branch }}-jdk${{ inputs.jdk-version }}.txt
1221
path: /tmp/
1322

1423
- name: download tests without times
1524
uses: actions/download-artifact@v4
1625
with:
17-
name: tests-without-times.txt
26+
name: tests-without-times-${{ inputs.branch }}-jdk${{ inputs.jdk-version }}.txt
1827
path: /tmp/
1928

2029
- name: split tests into known times and un-known times
@@ -192,5 +201,5 @@ runs:
192201
- name: upload individual tests
193202
uses: actions/upload-artifact@v4
194203
with:
195-
name: test_times_${{ env.CURRENT_INDEX }}.txt
204+
name: test_times_${{ inputs.branch }}_jdk${{ inputs.jdk-version }}_${{ env.CURRENT_INDEX }}.txt
196205
path: /tmp/test_times_${{ env.CURRENT_INDEX }}.txt
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: setup project with specified jdk
2+
description: setup project with specified jdk
3+
inputs:
4+
jdk-version:
5+
description: 'Java version to use'
6+
required: true
7+
default: '17'
8+
runs:
9+
using: "composite"
10+
steps:
11+
- uses: actions/setup-java@v4
12+
with:
13+
distribution: 'temurin'
14+
java-version: ${{ inputs.jdk-version }}

.github/workflows/composites/test-times/action.yaml

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@
88

99
name: test-times
1010
description: test-times
11+
inputs:
12+
jdk-version:
13+
description: 'Java version to use in cache key'
14+
required: true
15+
default: '17'
16+
branch:
17+
description: 'Branch name to use in artifact download'
18+
required: true
19+
default: 'main'
1120
runs:
1221
using: "composite"
1322

@@ -26,15 +35,20 @@ runs:
2635
- name: merge all artifacts into a single file and sort by time
2736
shell: bash
2837
run: |
29-
arr=($(find /tmp/all-artifacts/ -type f -name "test_times*"))
38+
# The artifact download creates directories named after the artifact
39+
# e.g., /tmp/all-artifacts/test_times_main_jdk17_0.txt/test_times_0.txt
40+
# So we need to find files inside directories matching the pattern
41+
arr=($(find /tmp/all-artifacts/test_times_${{ inputs.branch }}_jdk${{ inputs.jdk-version }}_* -type f 2>/dev/null || true))
42+
43+
echo "Found ${#arr[@]} test time files"
3044
3145
for i in "${arr[@]}"; do
3246
echo "parsing -> ${i}"
3347
cat "${i}" | awk '{print $3" "$6}' >> /tmp/times-of-all-tests.txt
3448
done
3549
3650
sort -t' ' -nk2 /tmp/times-of-all-tests.txt >> /tmp/sorted.txt
37-
51+
3852
cat /tmp/sorted.txt
3953
4054
- name: show all tests in a sorted manner
@@ -50,4 +64,4 @@ runs:
5064
uses: actions/cache/save@v4
5165
with:
5266
path: /tmp/sorted.txt
53-
key: ${{ runner.os }}-spring-cloud-k8s-existing-test-times-cache-${{ github.run_id }}
67+
key: ${{ runner.os }}-spring-cloud-k8s-jdk${{ inputs.jdk-version }}-test-times-cache-${{ github.run_id }}

0 commit comments

Comments
 (0)