File tree Expand file tree Collapse file tree 6 files changed +47
-7
lines changed
test-classpath-reader/src
main/java/org/sonar/java/test/classpath Expand file tree Collapse file tree 6 files changed +47
-7
lines changed Original file line number Diff line number Diff line change @@ -129,6 +129,7 @@ test_analyze_task:
129129 - ./check-license-compliance.sh
130130 cleanup_before_cache_script : cleanup_maven_repository
131131
132+ # Migrated to GHA.
132133qa_os_win_task :
133134 ec2_instance :
134135 image : base-windows-jdk21-v*
Original file line number Diff line number Diff line change @@ -271,3 +271,42 @@ jobs:
271271 -Dmaven.test.redirectTestOutputToFile=false
272272 -Dparallel=methods
273273 -DuseUnlimitedThreads=true
274+
275+ qa-os-win :
276+ name : Build and Unit Test on Windows
277+ # No dependency on build step, because we do not need the build number.
278+ runs-on : github-windows-latest-m
279+ permissions :
280+ id-token : write # Required for Vault OIDC authentication
281+ contents : write # Required for repository access and tagging
282+ steps :
283+ - name : Config Git
284+ run : git config --global core.autocrlf input
285+ - uses : actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
286+ - uses : jdx/mise-action@5ac50f778e26fac95da98d50503682459e86d566 # v3.2.0
287+ with :
288+ version : 2025.7.12
289+ - name : Run Maven
290+ run : mvn clean verify --batch-mode
291+
292+ promote :
293+ needs :
294+ - build
295+ - ruling-qa
296+ - plugin-qa
297+ - sanity
298+ - test-analyze
299+ - autoscan
300+ - qa-os-win
301+ if : ${{ needs.build.outputs.deployed }}
302+ runs-on : github-ubuntu-latest-s # Public repo uses custom GitHub-hosted runners
303+ name : Promote
304+ permissions :
305+ id-token : write
306+ contents : write
307+ env :
308+ BUILD_NUMBER : ${{ needs.build.outputs.build-number }}
309+ steps :
310+ - uses : SonarSource/ci-github-actions/promote@v1
311+ with :
312+ promote-pull-request : true
Original file line number Diff line number Diff line change 4343 <fileSeparator >/</fileSeparator >
4444 <pathSeparator >:${line.separator} </pathSeparator >
4545 <includeScope >test</includeScope >
46- <!-- $$ to not evaluate M2_REPO now, this will become ${M2_REPO} in the output file -->
47- <localRepoProperty >$${M2_REPO} </localRepoProperty >
46+ <localRepoProperty >M2_REPO</localRepoProperty >
4847 <outputEncoding >UTF-8</outputEncoding >
4948 <outputFile >${project.build.directory} /test-classpath.txt</outputFile >
5049 </configuration >
Original file line number Diff line number Diff line change @@ -158,11 +158,12 @@ public static List<File> loadFromFile(String classpathTextFilePath) {
158158 String mavenRepository = findMavenLocalRepository (System ::getenv , System ::getProperty );
159159 try {
160160 String content = Files .readString (toPath (classpathTextFilePath ), UTF_8 );
161- Arrays .stream (content .split (":" ))
161+ // Split on ":", but not when it follows Windows drive letter (e.g. "C:\").
162+ Arrays .stream (content .split ("(?<![A-Z]):" ))
162163 .map (String ::trim )
163164 .filter (line -> !line .isBlank ())
164165 .map (TestClasspathUtils ::fixSeparator )
165- .map (line -> line .replace ("${ M2_REPO} " , mavenRepository ))
166+ .map (line -> line .replace ("M2_REPO" , mavenRepository ))
166167 .map (Paths ::get )
167168 .forEach (dependencyPath -> {
168169 if (!Files .exists (dependencyPath )) {
Original file line number Diff line number Diff line change 1- ${ M2_REPO} /com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar:
1+ M2_REPO/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar:
22
Original file line number Diff line number Diff line change 1- ${ M2_REPO} /com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar:
2- ${ M2_REPO} /org/bad/luck/missing-artifact/666/missing-artifact-666.jar:
1+ M2_REPO/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar:
2+ M2_REPO/org/bad/luck/missing-artifact/666/missing-artifact-666.jar:
You can’t perform that action at this time.
0 commit comments