Skip to content

Commit

Permalink
💚 TEST_VERBOSE and LOG_LEVEL #189
Browse files Browse the repository at this point in the history
  • Loading branch information
trydofor committed Jan 18, 2024
1 parent e3cc668 commit c4e8547
Show file tree
Hide file tree
Showing 62 changed files with 472 additions and 221 deletions.
27 changes: 17 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflow_dispatch:
inputs:
testCoverReport:
description: 'test and Coverage report?'
description: 'test and coverage report?'
default: true
type: boolean
required: false
Expand All @@ -14,6 +14,15 @@ on:
default: false
type: boolean
required: false
testLoggerLevel:
description: 'test logger level'
default: INFO
type: choice
options:
- DEBUG
- INFO
- WARN
- ERROR
deployOssrh:
description: 'deploy to ossrh?'
default: true
Expand All @@ -29,7 +38,7 @@ jobs:
env:
MAVEN_OPTS: -Xmx2g
LOG_LEVEL: ${{ inputs.testLoggerLevel }}
WINGS_HOME: ${{ github.workspace }}
TEST_VERBOSE: ${{ inputs.testLoggerLevel == 'DEBUG' }}

steps:
- name: Checkout ${{github.event.release.tag_name}}
Expand Down Expand Up @@ -92,20 +101,18 @@ jobs:
## report if not release
- name: Test Coverage ${{ steps.settings.outputs.WINGS_VERSION }} ${{ steps.settings.outputs.GIT_BRANCH }}
if: inputs.testCoverReport
run: >
mvn
-P 'test,!example'
--quiet
-Duser.timezone=Asia/Shanghai
-Dmaven.test.failure.ignore=${{ inputs.testFailureIgnore }}
-DrepoToken=${{ secrets.COVERALLS_REPO_TOKEN }}
clean test jacoco:report coveralls:report
run: |
mvn -P 'test,!example' -Dmaven.test.failure.ignore=${{ inputs.testFailureIgnore }} clean test
mvn -pl ':devs-coverage' -am jacoco:report-aggregate
mvn -pl ':devs-coverage' -DrepoToken=$COVERALLS_WINGS verify
env:
TZ: Asia/Shanghai
JAVA_HOME: ${{ steps.settings.outputs.JAVA_HOME }}
MAIL_USER: ${{ secrets.MAIL_USER }}
MAIL_PASS: ${{ secrets.MAIL_PASS }}
MAIL_FROM: ${{ secrets.MAIL_FROM }}
MAIL_TO: ${{ secrets.MAIL_TO }}
COVERALLS_WINGS: ${{ secrets.COVERALLS_REPO_TOKEN }}

## import gpp private key
- name: Import GPG key
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
server.port=8091
spring.application.name=winx-admin
debug=true

#logging.level.org.springframework.session.web.http=DEBUG
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
debug=${TEST_VERBOSE:true}

############## BGN: For testing only, to be removed before release ##############
wings.warlock.security.mem-user[winx-admin].user-id=99
wings.warlock.security.mem-user[winx-admin].username=[email protected]
Expand Down

This file was deleted.

3 changes: 2 additions & 1 deletion example/winx-api/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
server.port=8095
spring.application.name=winx-api
debug=true

debug=${TEST_VERBOSE:true}

servicecomb.service.application=servicecomb-demo
servicecomb.service.name=winx-api
2 changes: 2 additions & 0 deletions example/winx-common/src/test/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
server.port=8092
spring.application.name=winx-common

debug=${TEST_VERBOSE:true}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
server.port=8093
spring.application.name=winx-devops

#debug=true
#debug=${TEST_VERBOSE:true}
## disable CONDITIONS EVALUATION REPORT
logging.level.org.springframework.boot.autoconfigure=INFO
#logging.file.name=winx-devops.log
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.moilioncircle.wings.devops.project;

import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
Expand All @@ -18,6 +19,7 @@

@SpringBootTest
@Disabled("Project: Dump Enums")
@Slf4j
public class Devops7EnumsDumperTest {

@Setter(onMethod_ = {@Autowired})
Expand All @@ -33,7 +35,7 @@ public void dumpCodeEnum() {
String grp = e.getKey().getName();
for (Enum<?> enu : e.getValue()) {
CodeEnum en = (CodeEnum) enu;
System.out.printf("%s\t%s\t%s\t%s\n", enu.name(), en.getCode(), en.getHint(), grp);
log.info("{}\t{}\t{}\t{}", enu.name(), en.getCode(), en.getHint(), grp);
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
debug=${TEST_VERBOSE:true}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
debug=${TEST_VERBOSE:true}

This file was deleted.

2 changes: 1 addition & 1 deletion observe/mirana
Loading

0 comments on commit c4e8547

Please sign in to comment.