File tree Expand file tree Collapse file tree 18 files changed +146
-45
lines changed
maven-build-with-dry-run-for-tests
run-and-save-test-times-when-cache-present
spring-cloud-kubernetes-client-discovery
spring-cloud-kubernetes-commons/src/test/java/org/springframework/cloud/kubernetes/commons/profile
spring-cloud-kubernetes-controllers/spring-cloud-kubernetes-configuration-watcher
spring-cloud-kubernetes-examples/kubernetes-leader-election-example
spring-cloud-kubernetes-fabric8-config
spring-cloud-kubernetes-fabric8-discovery
spring-cloud-kubernetes-test-support
java/org/springframework/cloud/kubernetes
integration/tests/commons Expand file tree Collapse file tree 18 files changed +146
-45
lines changed Original file line number Diff line number Diff line change @@ -3,14 +3,26 @@ description: maven-build-with-dry-run-for-tests
3
3
runs :
4
4
using : " composite"
5
5
steps :
6
- - name : maven-build-with-dry-run-for-tests
6
+
7
+ - name : run 'package' on the project
8
+ shell : bash
9
+ run : |
10
+ ./mvnw install -B \
11
+ -Dskip.build.image=true \
12
+ -DskipTests -DskipITs \
13
+ -T 1C -q
14
+
15
+ - name : find all classpath entries
16
+ shell : bash
17
+ run : |
18
+ ./mvnw -q exec:exec -Dexec.classpathScope="test" -Dexec.executable="echo" -Dexec.args="%classpath" | tr : "\n" > /tmp/deps.txt
19
+
20
+ - name : find all tests
7
21
shell : bash
8
22
run : |
9
- # find all the tests that are supposed to be run, but don't actually run them.
10
- # this is achieved via: 'spring.cloud.k8s.skip.tests=true' in DisabledTestsCondition
11
- ./mvnw test -B -Dskip.build.image=true -Dspring.cloud.k8s.skip.tests=true \
12
- -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=error \
13
- -T 1C -q > /tmp/tests.txt
23
+ cd spring-cloud-kubernetes-test-support
24
+ .././mvnw -q exec:java -Dexec.mainClass="org.springframework.cloud.kubernetes.tests.discovery.TestsDiscovery" > /tmp/tests.txt
25
+ cd ..
14
26
15
27
- name : show result
16
28
if : always()
Original file line number Diff line number Diff line change 8
8
uses : actions/cache/restore@v3
9
9
with :
10
10
path : /tmp/sorted.txt
11
- key : ${{ runner.os }}-spring-cloud-kubernetes -existing-test-times-cache-${{ github.run_id }}
12
- restore-keys : ${{ runner.os }}-spring-cloud-kubernetes -existing-test-times-cache-
11
+ key : ${{ runner.os }}-spring-cloud-k8s -existing-test-times-cache-${{ github.run_id }}
12
+ restore-keys : ${{ runner.os }}-spring-cloud-k8s -existing-test-times-cache-
13
13
14
14
- name : show cached test times
15
15
shell : bash
@@ -138,7 +138,7 @@ runs:
138
138
# the previous cache will contain more tests then we currently have, so some
139
139
# matrix instances will have no tests to run
140
140
if [[ "$sum" -eq "0" ]]; then
141
- echo "no tests to run in current index, most probably this PR removed some tests "
141
+ echo "no tests (with known times) to run in current index"
142
142
tests_to_run_in_current_index='none'
143
143
fi
144
144
Original file line number Diff line number Diff line change @@ -47,12 +47,12 @@ runs:
47
47
48
48
# save with the current run_id, but restore it without it. This means two things:
49
49
# 1) if we re-run, cache will be available
50
- # 2) if there is a new run, we restore as '${{ runner.os }}-spring-cloud-kubernetes -existing-test-times-cache-'
50
+ # 2) if there is a new run, we restore as '${{ runner.os }}-spring-cloud-k8s -existing-test-times-cache-'
51
51
# meaning there could be many of them already present and this is not an exact match
52
52
# github in this case will pick up the latest one, exactly what we want.
53
53
- name : save test times in cache
54
54
uses : actions/cache/save@v3
55
55
if : env.BASE_BRANCH != '2.1.x'
56
56
with :
57
57
path : /tmp/sorted.txt
58
- key : ${{ runner.os }}-spring-cloud-kubernetes -existing-test-times-cache-${{ github.run_id }}
58
+ key : ${{ runner.os }}-spring-cloud-k8s -existing-test-times-cache-${{ github.run_id }}
Original file line number Diff line number Diff line change 67
67
uses : actions/cache/restore@v3
68
68
with :
69
69
path : /tmp/sorted.txt
70
- key : ${{ runner.os }}-spring-cloud-kubernetes -existing-test-times-cache-${{ github.run_id }}
71
- restore-keys : ${{ runner.os }}-spring-cloud-kubernetes -existing-test-times-cache-
70
+ key : ${{ runner.os }}-spring-cloud-k8s -existing-test-times-cache-${{ github.run_id }}
71
+ restore-keys : ${{ runner.os }}-spring-cloud-k8s -existing-test-times-cache-
72
72
73
73
- name : check test times cache exists
74
74
id : check_files
Original file line number Diff line number Diff line change 50
50
<artifactId >spring-boot-starter-test</artifactId >
51
51
<scope >test</scope >
52
52
</dependency >
53
- <dependency >
54
- <groupId >org.junit.vintage</groupId >
55
- <artifactId >junit-vintage-engine</artifactId >
56
- <scope >test</scope >
57
- </dependency >
58
53
<dependency >
59
54
<groupId >org.springframework.boot</groupId >
60
55
<artifactId >spring-boot-starter-web</artifactId >
Original file line number Diff line number Diff line change 39
39
/**
40
40
* @author wind57
41
41
*/
42
- public class AbstractKubernetesProfileEnvironmentPostProcessorTest {
42
+ public class KubernetesProfileEnvironmentPostProcessorTest {
43
43
44
44
private static final String FOUNT_IT = "foundIt" ;
45
45
Original file line number Diff line number Diff line change 66
66
<artifactId >spring-rabbit-test</artifactId >
67
67
<scope >test</scope >
68
68
</dependency >
69
- <dependency >
70
- <groupId >org.junit.vintage</groupId >
71
- <artifactId >junit-vintage-engine</artifactId >
72
- <scope >test</scope >
73
- </dependency >
74
69
<dependency >
75
70
<groupId >org.mockito</groupId >
76
71
<artifactId >mockito-inline</artifactId >
Original file line number Diff line number Diff line change 49
49
<artifactId >spring-boot-starter-test</artifactId >
50
50
<scope >test</scope >
51
51
</dependency >
52
- <dependency >
53
- <groupId >org.junit.vintage</groupId >
54
- <artifactId >junit-vintage-engine</artifactId >
55
- <scope >test</scope >
56
- </dependency >
57
52
</dependencies >
58
53
59
54
<build >
Original file line number Diff line number Diff line change 97
97
<artifactId >spring-boot-starter-test</artifactId >
98
98
<scope >test</scope >
99
99
</dependency >
100
- <dependency >
101
- <groupId >org.junit.vintage</groupId >
102
- <artifactId >junit-vintage-engine</artifactId >
103
- <scope >test</scope >
104
- </dependency >
105
100
<dependency >
106
101
<groupId >org.springframework.cloud</groupId >
107
102
<artifactId >spring-cloud-test-support</artifactId >
Original file line number Diff line number Diff line change 68
68
<scope >test</scope >
69
69
</dependency >
70
70
71
- <dependency >
72
- <groupId >org.junit.vintage</groupId >
73
- <artifactId >junit-vintage-engine</artifactId >
74
- <scope >test</scope >
75
- </dependency >
76
-
77
71
<dependency >
78
72
<groupId >org.springframework.boot</groupId >
79
73
<artifactId >spring-boot-starter-web</artifactId >
You can’t perform that action at this time.
0 commit comments