Skip to content

Commit

Permalink
build: 修正GitHub Actions无法触发测试的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
stick-i committed Oct 12, 2024
1 parent 26368f8 commit 089f6f1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/mvn-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
java-version: '8'
cache: maven

- run: |
Expand Down
13 changes: 6 additions & 7 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,12 @@
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<!-- 若要在GitHub Actions上执行mvn test,则必须添加此插件才能成功执行 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
</plugin>
<!-- Source -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -169,13 +175,6 @@
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- 测试报告上传Coveralls -->
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/logback-test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<!-- 简单日志模式 - 完整类名 -->
<pattern>[%highlight(%-5level)][%X{fullClassName}][%X{id}][%X{fieldName}] - %msg%n</pattern>
<pattern>[%highlight(%level)][%X{fullClassName}][%X{id}][%X{fieldName}] - %msg%n</pattern>
<!-- 简单日志模式 -->
<!-- <pattern>[%highlight(%-5level)][%X{className}][%X{id}][%X{fieldName}] - %msg%n</pattern> -->
<!-- 详细日志模式 -->
Expand Down

0 comments on commit 089f6f1

Please sign in to comment.