Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/actions/upload-actual/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ runs:
if: runner.os != 'Windows'

- name: Generate Diff Report
if: runner.os != 'Windows'
shell: bash
env:
IT_DIR: ${{ inputs.it-dir }}
Expand All @@ -46,6 +47,7 @@ runs:
npx diff2html-cli --input file --style side --file "target/diff_${NAME}.html" -- "target/test.diff"

- name: Upload Diff Report
if: runner.os != 'Windows'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: diff_${{ inputs.name }}
Expand Down
24 changes: 18 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ jobs:
item:
- { runner: warp-custom-ubuntu-24-04, profile: without-sonarqube-project, sq_version: LATEST_RELEASE }
- { runner: warp-custom-ubuntu-24-04, profile: only-sonarqube-project, sq_version: LATEST_RELEASE }
- { runner: github-windows-latest-m, profile: without-sonarqube-project, sq_version: LATEST_RELEASE }
- { runner: github-windows-latest-m, profile: only-sonarqube-project, sq_version: LATEST_RELEASE }
- { runner: warp-custom-windows-2022-m, profile: without-sonarqube-project, sq_version: LATEST_RELEASE }
- { runner: warp-custom-windows-2022-m, profile: only-sonarqube-project, sq_version: LATEST_RELEASE }
name: Ruling QA
needs:
- build
Expand All @@ -69,8 +69,11 @@ jobs:
id-token: write
contents: write
env:
BUILD_NUMBER: ${{ needs.build.outputs.build-number }}
BUILD_NUMBER: ${{ matrix.item.runner == 'warp-custom-windows-2022-m' && '46575' || needs.build.outputs.build-number }}
steps:
- name: Config Git
if: runner.os == 'Windows'
run: git config --global core.autocrlf input
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
submodules: recursive
Expand Down Expand Up @@ -108,11 +111,17 @@ jobs:
- name: Run ruling tests
shell: bash # Set explicitly so Bash is used on Windows runners too.
env:
MAVEN_OPTS: "-Xmx3g"
MAVEN_OPTS: "-Xmx3g -Dfile.encoding=UTF-8"
JAVA_TOOL_OPTIONS: ""
GITHUB_TOKEN: ${{ fromJSON(steps.secrets.outputs.vault).GITHUB_TOKEN }}
run: |
cd its/ruling
mvn package ${MAVEN_OUTPUT_ARGS} "-Pit-ruling,${{ matrix.item.profile }}" -Dsonar.runtimeVersion=${{ matrix.item.sq_version }} -Dmaven.test.redirectTestOutputToFile=false -Dparallel=methods -DuseUnlimitedThreads=true
extra_args=()
# Nested Maven builds share ~/.m2; Windows denies concurrent writes to *.lastUpdated.
if [[ "${RUNNER_OS}" != "Windows" ]]; then
extra_args+=(-Dparallel=methods -DuseUnlimitedThreads=true)
fi
mvn package ${MAVEN_OUTPUT_ARGS} "-Pit-ruling,${{ matrix.item.profile }}" -Dsonar.runtimeVersion=${{ matrix.item.sq_version }} -Dmaven.test.redirectTestOutputToFile=false "${extra_args[@]}"
- name: Upload Actual Results On Failure
if: failure()
uses: ./.github/actions/upload-actual
Expand Down Expand Up @@ -364,7 +373,7 @@ jobs:
qa-os-win:
name: Build and Unit Test on Windows
# No dependency on build step, because we do not need the build number.
runs-on: github-windows-latest-m
runs-on: warp-custom-windows-2022-m
permissions:
id-token: write # Required for Vault OIDC authentication
contents: write # Required for repository access and tagging
Expand All @@ -387,6 +396,9 @@ jobs:
use-develocity: ${{ env.USE_DEVELOCITY }}
develocity-url: ${{ env.DEVELOCITY_URL }}
- name: Run Maven
env:
JAVA_TOOL_OPTIONS: ""
MAVEN_OPTS: "-Xmx8g"
run: mvn clean verify --batch-mode

promote:
Expand Down
5 changes: 5 additions & 0 deletions its/ruling/src/test/resources/mall/java-S2160.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"com.macro.mall:mall:mall-admin/src/main/java/com/macro/mall/dto/PmsProductResult.java": [
11
]
}
1 change: 1 addition & 0 deletions its/ruling/src/test/resources/mall/java-S6212.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
65,
69,
76,
91,
107
],
"com.macro.mall:mall:mall-admin/src/main/java/com/macro/mall/controller/OssController.java": [
Expand Down