Skip to content

Commit 692080d

Browse files
committed
cleanup profiles. add to ci.
1 parent 11cbc54 commit 692080d

File tree

5 files changed

+121
-115
lines changed

5 files changed

+121
-115
lines changed

.github/workflows/ci.yaml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,22 @@ jobs:
3636
- run: .kokoro/build.sh
3737
env:
3838
JOB_TYPE: test
39-
GOOGLE_SDK_JAVA_LOGGING: true
39+
units-logging:
40+
runs-on: ubuntu-latest
41+
strategy:
42+
fail-fast: false
43+
matrix:
44+
java: [11, 17, 21]
45+
steps:
46+
- uses: actions/checkout@v4
47+
- uses: actions/setup-java@v4
48+
with:
49+
distribution: temurin
50+
java-version: ${{matrix.java}}
51+
- run: java -version
52+
- run: .kokoro/build.sh
53+
env:
54+
JOB_TYPE: test-logging
4055
units-java8:
4156
# Building using Java 17 and run the tests with Java 8 runtime
4257
name: "units (8)"
@@ -59,7 +74,6 @@ jobs:
5974
- run: .kokoro/build.sh
6075
env:
6176
JOB_TYPE: test
62-
GOOGLE_SDK_JAVA_LOGGING: true
6377
windows:
6478
runs-on: windows-latest
6579
steps:
@@ -74,7 +88,6 @@ jobs:
7488
- run: .kokoro/build.bat
7589
env:
7690
JOB_TYPE: test
77-
GOOGLE_SDK_JAVA_LOGGING: true
7891
dependencies:
7992
runs-on: ubuntu-latest
8093
strategy:

.kokoro/build.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ test)
5151
mvn test -B -ntp -Dclirr.skip=true -Denforcer.skip=true ${SUREFIRE_JVM_OPT}
5252
RETURN_CODE=$?
5353
;;
54+
test-logging)
55+
echo "SUREFIRE_JVM_OPT: ${SUREFIRE_JVM_OPT}"
56+
mvn test -P '!slf4j2x,slf4j2x-test' -B -ntp -Dclirr.skip=true -Denforcer.skip=true ${SUREFIRE_JVM_OPT}
57+
RETURN_CODE=$?
58+
;;
5459
lint)
5560
mvn com.coveo:fmt-maven-plugin:check -B -ntp
5661
RETURN_CODE=$?

oauth2_http/pom.xml

Lines changed: 0 additions & 98 deletions
Original file line numberDiff line numberDiff line change
@@ -71,100 +71,6 @@
7171
</plugins>
7272
</build>
7373
</profile>
74-
<profile>
75-
<id>slf4j2x</id>
76-
<activation>
77-
<activeByDefault>true</activeByDefault>
78-
</activation>
79-
<dependencies>
80-
<dependency>
81-
<groupId>org.slf4j</groupId>
82-
<artifactId>slf4j-api</artifactId>
83-
<version>${project.slf4j.version}</version>
84-
<optional>true</optional>
85-
</dependency>
86-
</dependencies>
87-
</profile>
88-
89-
<profile>
90-
<id>slf4j2x-test</id>
91-
<activation>
92-
<activeByDefault>true</activeByDefault>
93-
</activation>
94-
<build>
95-
<plugins>
96-
97-
<!-- <plugin>-->
98-
<!-- <artifactId>maven-compiler-plugin</artifactId>-->
99-
<!-- <version>3.13.0</version>-->
100-
<!-- <configuration>-->
101-
<!-- <source>1.8</source>-->
102-
<!-- <target>1.8</target>-->
103-
<!-- <encoding>UTF-8</encoding>-->
104-
105-
<!-- &lt;!&ndash; excluding tests depending on logback/env var by default &ndash;&gt;-->
106-
<!-- <testIncludes>-->
107-
<!-- <testInclude>**/Slf4jUtilsTest.java</testInclude>-->
108-
<!-- <testInclude>**/Slf4jUtils1xTest.java</testInclude>-->
109-
<!-- <testInclude>**/TestAppender.java</testInclude>-->
110-
<!-- <testInclude>**/LoggingTest.java</testInclude>-->
111-
<!-- </testIncludes>-->
112-
<!-- </configuration>-->
113-
<!-- </plugin>-->
114-
</plugins>
115-
</build>
116-
<dependencies>
117-
<!--gets gson from com.google.http-client:google-http-client-gson-->
118-
<!-- Logback for testing -->
119-
<dependency>
120-
<groupId>ch.qos.logback</groupId>
121-
<artifactId>logback-classic</artifactId>
122-
<version>1.5.16</version>
123-
<scope>test</scope>
124-
</dependency>
125-
<dependency>
126-
<groupId>ch.qos.logback</groupId>
127-
<artifactId>logback-core</artifactId>
128-
<version>1.5.16</version>
129-
<scope>test</scope>
130-
</dependency>
131-
</dependencies>
132-
</profile>
133-
<!-- <profile>-->
134-
<!-- <id>slf4j1x-test</id>-->
135-
<!--&lt;!&ndash; mvn dependency:tree -Dincludes=org.slf4j:slf4j-api -P '!slf4j2x,!slf4j2x-test,slf4j1x-test'-->
136-
<!--&ndash;&gt;-->
137-
<!-- <dependencies>-->
138-
<!-- <dependency>-->
139-
<!-- <groupId>org.slf4j</groupId>-->
140-
<!-- <artifactId>slf4j-api</artifactId>-->
141-
<!-- <version>2.0.16</version>-->
142-
<!-- <scope>compile</scope>-->
143-
<!-- </dependency>-->
144-
<!-- <dependency>-->
145-
<!-- <groupId>org.slf4j</groupId>-->
146-
<!-- <artifactId>slf4j-api</artifactId>-->
147-
<!-- <version>1.7.36</version>-->
148-
<!-- <scope>test</scope>-->
149-
<!-- </dependency>-->
150-
151-
<!-- &lt;!&ndash;gets gson from com.google.http-client:google-http-client-gson&ndash;&gt;-->
152-
<!-- &lt;!&ndash; Logback for testing &ndash;&gt;-->
153-
<!-- <dependency>-->
154-
<!-- <groupId>ch.qos.logback</groupId>-->
155-
<!-- <artifactId>logback-classic</artifactId>-->
156-
<!-- <version>1.2.13</version>-->
157-
<!-- <scope>test</scope>-->
158-
<!-- </dependency>-->
159-
<!-- <dependency>-->
160-
<!-- <groupId>ch.qos.logback</groupId>-->
161-
<!-- <artifactId>logback-core</artifactId>-->
162-
<!-- <version>1.2.13</version>-->
163-
<!-- <scope>test</scope>-->
164-
<!-- </dependency>-->
165-
<!-- </dependencies>-->
166-
<!-- </profile>-->
167-
16874
</profiles>
16975

17076
<build>
@@ -333,9 +239,6 @@
333239
<artifactId>error_prone_annotations</artifactId>
334240
<scope>compile</scope>
335241
</dependency>
336-
337-
338-
339242
<dependency>
340243
<groupId>junit</groupId>
341244
<artifactId>junit</artifactId>
@@ -354,5 +257,4 @@
354257
<scope>test</scope>
355258
</dependency>
356259
</dependencies>
357-
358260
</project>

oauth2_http/testresources/logback-test.xml

Lines changed: 0 additions & 6 deletions
This file was deleted.

pom.xml

Lines changed: 100 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -286,14 +286,14 @@
286286
<target>1.8</target>
287287
<encoding>UTF-8</encoding>
288288

289-
<!-- excluding tests depending on logback/env var by default -->
290-
<testExcludes>
291-
<testExclude>**/Slf4jUtilsLogbackTest.java</testExclude>
292-
<testExclude>**/Slf4jUtils1xTest.java</testExclude>
293-
<testExclude>**/Slf4jUtilsTest.java</testExclude>
294-
<testExclude>**/TestAppender.java</testExclude>
295-
<testExclude>**/LoggingTest.java</testExclude>
296-
</testExcludes>
289+
<!-- &lt;!&ndash; excluding tests depending on logback/env var by default &ndash;&gt;-->
290+
<!-- <testExcludes>-->
291+
<!-- <testExclude>**/Slf4jUtilsLogbackTest.java</testExclude>-->
292+
<!-- <testExclude>**/Slf4jUtils1xTest.java</testExclude>-->
293+
<!-- <testExclude>**/Slf4jUtilsTest.java</testExclude>-->
294+
<!-- <testExclude>**/TestAppender.java</testExclude>-->
295+
<!-- <testExclude>**/LoggingTest.java</testExclude>-->
296+
<!-- </testExcludes>-->
297297
</configuration>
298298
</plugin>
299299
<plugin>
@@ -430,6 +430,98 @@
430430
</reporting>
431431

432432
<profiles>
433+
<profile>
434+
<id>slf4j2x</id>
435+
<activation>
436+
<activeByDefault>true</activeByDefault>
437+
</activation>
438+
<build>
439+
<plugins>
440+
<plugin>
441+
<artifactId>maven-compiler-plugin</artifactId>
442+
<version>3.13.0</version>
443+
<configuration>
444+
<source>1.8</source>
445+
<target>1.8</target>
446+
<encoding>UTF-8</encoding>
447+
448+
<!-- excluding tests depending on logback/env var by default -->
449+
<testExcludes>
450+
<testExclude>**/Slf4jUtilsLogbackTest.java</testExclude>
451+
<testExclude>**/Slf4jUtils1xTest.java</testExclude>
452+
<testExclude>**/Slf4jUtilsTest.java</testExclude>
453+
<testExclude>**/TestAppender.java</testExclude>
454+
<testExclude>**/LoggingTest.java</testExclude>
455+
</testExcludes>
456+
</configuration>
457+
</plugin>
458+
</plugins>
459+
</build>
460+
<dependencies>
461+
<dependency>
462+
<groupId>org.slf4j</groupId>
463+
<artifactId>slf4j-api</artifactId>
464+
<version>${project.slf4j.version}</version>
465+
<optional>true</optional>
466+
</dependency>
467+
</dependencies>
468+
</profile>
469+
470+
<profile>
471+
<id>slf4j2x-test</id>
472+
<!-- This profile is for logging test only
473+
mvn clean test -P '!slf4j2x,slf4j2x-test'
474+
-->
475+
<modules>
476+
477+
<module>credentials</module>
478+
<module>oauth2_http</module>
479+
</modules>
480+
<build>
481+
<plugins>
482+
483+
<plugin>
484+
<artifactId>maven-compiler-plugin</artifactId>
485+
<version>3.13.0</version>
486+
<configuration>
487+
<source>1.8</source>
488+
<target>1.8</target>
489+
<encoding>UTF-8</encoding>
490+
491+
<!-- excluding tests depending on logback/env var by default -->
492+
<testIncludes>
493+
<testInclude>**/Slf4jUtilsLogbackTest.java</testInclude>
494+
<testInclude>**/Slf4jUtils1xTest.java</testInclude>
495+
<testInclude>**/Slf4jUtilsTest.java</testInclude>
496+
<testInclude>**/TestAppender.java</testInclude>
497+
<testInclude>**/LoggingTest.java</testInclude>
498+
</testIncludes>
499+
</configuration>
500+
</plugin>
501+
</plugins>
502+
</build>
503+
<dependencies>
504+
<dependency>
505+
<groupId>org.slf4j</groupId>
506+
<artifactId>slf4j-api</artifactId>
507+
<version>${project.slf4j.version}</version>
508+
</dependency>
509+
<!--gets gson from com.google.http-client:google-http-client-gson-->
510+
<!-- Logback for testing -->
511+
<dependency>
512+
<groupId>ch.qos.logback</groupId>
513+
<artifactId>logback-classic</artifactId>
514+
<version>1.5.16</version>
515+
<scope>test</scope>
516+
</dependency>
517+
<dependency>
518+
<groupId>ch.qos.logback</groupId>
519+
<artifactId>logback-core</artifactId>
520+
<version>1.5.16</version>
521+
<scope>test</scope>
522+
</dependency>
523+
</dependencies>
524+
</profile>
433525
<profile>
434526
<id>release-sign-artifacts</id>
435527
<activation>

0 commit comments

Comments
 (0)