From b330ee4d5e6690c2181e8b05eb23ce807819dea3 Mon Sep 17 00:00:00 2001 From: Roman Wolf Date: Tue, 14 Oct 2025 09:17:35 +0200 Subject: [PATCH 1/6] Fix build errors Update CodeQL configuration to be stable and execute successfully. --- .github/workflows/codeql.yml | 30 +++++++++++++++++++-- .github/workflows/maven.yml | 2 +- .github/workflows/maven_central_publish.yml | 2 +- .github/workflows/maven_github_publish.yml | 2 +- README.md | 10 +++---- 5 files changed, 36 insertions(+), 10 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 04dbca9..f70a183 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -30,13 +30,39 @@ jobs: java-version: '21' distribution: 'temurin' + - name: Cache Maven dependencies + uses: actions/cache@v4 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + + - name: Configure Maven Central mirror + run: | + mkdir -p ~/.m2 + cat > ~/.m2/settings.xml <<'EOF' + + + + central-mirror + Central Mirror + https://repo1.maven.org/maven2 + central + + + + EOF + - name: Initialize CodeQL uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} + build-mode: manual - - name: Build with Maven - run: mvn clean compile + - name: Build and test with Maven + run: | + mvn -B clean test -Dmaven.wagon.http.retryHandler.count=5 - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 92823cb..065cd47 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -22,7 +22,7 @@ jobs: - name: Build project and run UI test uses: coactions/setup-xvfb@v1 with: - run: mvn clean verify -Pci + run: mvn -B clean verify -Pci - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v5 diff --git a/.github/workflows/maven_central_publish.yml b/.github/workflows/maven_central_publish.yml index dcbc3d0..64b6e28 100644 --- a/.github/workflows/maven_central_publish.yml +++ b/.github/workflows/maven_central_publish.yml @@ -39,6 +39,6 @@ jobs: }] - name: Release package - run: mvn clean deploy -Prelease,maven-central -DskipTests + run: mvn -B clean deploy -Prelease,maven-central -DskipTests env: GPG_SECRET_KEY_PASSPHRASE: ${{ secrets.GPG_SECRET_KEY_PASSPHRASE }} diff --git a/.github/workflows/maven_github_publish.yml b/.github/workflows/maven_github_publish.yml index dbd87ff..f16ee3c 100644 --- a/.github/workflows/maven_github_publish.yml +++ b/.github/workflows/maven_github_publish.yml @@ -38,7 +38,7 @@ jobs: }] - name: Publish package - run: mvn --batch-mode deploy -Prelease -DskipTests + run: mvn -B deploy -Prelease -DskipTests env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} GPG_SECRET_KEY_PASSPHRASE: ${{ secrets.GPG_SECRET_KEY_PASSPHRASE }} \ No newline at end of file diff --git a/README.md b/README.md index f1874c0..c577f41 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # WindowTester Pro -![GitHub release (v5.*)](https://img.shields.io/github/v/release/r4fterman/windowtester?filter=v5.*&display_name=tag) -[![Maven Central Version](https://img.shields.io/maven-central/v/io.github.r4fterman/com.windowtester.runtime?strategy=highestVersion&filter=5*)](https://mvnrepository.com/search?q=windowtester) -![Static Badge](https://img.shields.io/badge/Java-v17-blue) -![Static Badge](https://img.shields.io/badge/Maven-v3.5.4-blue) +![GitHub release (v6.*)](https://img.shields.io/github/v/release/r4fterman/windowtester?filter=v6.*&display_name=tag) +[![Maven Central Version](https://img.shields.io/maven-central/v/io.github.r4fterman/com.windowtester.runtime?strategy=highestVersion&filter=6*)](https://mvnrepository.com/search?q=windowtester) +![Static Badge](https://img.shields.io/badge/Java-v21-blue) +![Static Badge](https://img.shields.io/badge/Maven-v3.9.9-blue) [![License](https://img.shields.io/badge/License-EPL--1.0-green.svg)](LICENSE.md) [![Build WindowTester](https://github.com/r4fterman/windowtester/actions/workflows/maven.yml/badge.svg)](https://github.com/r4fterman/windowtester/actions/workflows/maven.yml) [![codecov](https://codecov.io/gh/r4fterman/windowtester/graph/badge.svg?token=fEDTM853bU)](https://codecov.io/gh/r4fterman/windowtester) @@ -34,7 +34,7 @@ can be run within your IDE, or they can be automated to run using [Maven](http:/ ## Requirements - JDK 21 -- JUnit 5 +- JUnit 6 Supported platforms: From 25e4104a4c407b98db8ef95162869be4d44dfde2 Mon Sep 17 00:00:00 2001 From: Roman Wolf Date: Tue, 14 Oct 2025 09:26:43 +0200 Subject: [PATCH 2/6] Fix build errors Run CodeQL with target "test" on a xvfb environment. --- .github/workflows/codeql.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index f70a183..81eccc9 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -61,6 +61,7 @@ jobs: build-mode: manual - name: Build and test with Maven + uses: coactions/setup-xvfb@v1 run: | mvn -B clean test -Dmaven.wagon.http.retryHandler.count=5 From f0933f437d5b5ee2cc5e29d80ed7fdd26470c57d Mon Sep 17 00:00:00 2001 From: Roman Wolf Date: Tue, 14 Oct 2025 09:30:05 +0200 Subject: [PATCH 3/6] Fix build errors Fix error in Github action yaml. --- .github/workflows/codeql.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 81eccc9..d6802d9 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -60,12 +60,15 @@ jobs: languages: ${{ matrix.language }} build-mode: manual + - name: Start virtual framebuffer (Xvfb) + uses: coactions/setup-xvfb@v1 + - name: Build and test with Maven uses: coactions/setup-xvfb@v1 - run: | - mvn -B clean test -Dmaven.wagon.http.retryHandler.count=5 + with: + run: mvn -B clean test -Dmaven.wagon.http.retryHandler.count=5 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 + uses: github/codeql-action/analyze@v4 with: category: "/language:${{matrix.language}}" \ No newline at end of file From 7bf6fea3291fbd797c98fd1cbe9dba65b6fe1d27 Mon Sep 17 00:00:00 2001 From: Roman Wolf Date: Tue, 14 Oct 2025 09:31:47 +0200 Subject: [PATCH 4/6] Fix build errors Fix error in Github action yaml. --- .github/workflows/codeql.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index d6802d9..e67c549 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -60,9 +60,6 @@ jobs: languages: ${{ matrix.language }} build-mode: manual - - name: Start virtual framebuffer (Xvfb) - uses: coactions/setup-xvfb@v1 - - name: Build and test with Maven uses: coactions/setup-xvfb@v1 with: From 113dc2ee719cdb11d58e6102a112eeb73d8104d6 Mon Sep 17 00:00:00 2001 From: Roman Wolf Date: Tue, 14 Oct 2025 09:39:12 +0200 Subject: [PATCH 5/6] Fix build errors During CodeQL maven only needs to compile the code. --- .github/workflows/codeql.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index e67c549..b7d2666 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -61,9 +61,7 @@ jobs: build-mode: manual - name: Build and test with Maven - uses: coactions/setup-xvfb@v1 - with: - run: mvn -B clean test -Dmaven.wagon.http.retryHandler.count=5 + run: mvn -B clean compile -Dmaven.wagon.http.retryHandler.count=5 - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v4 From 4fea8a3d6ac551a6928b4b650a7e01126ff65c0e Mon Sep 17 00:00:00 2001 From: Roman Wolf Date: Tue, 14 Oct 2025 09:40:33 +0200 Subject: [PATCH 6/6] Fix build errors Initialize and analyze with CodeQL version 4. --- .github/workflows/codeql.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index b7d2666..4df9239 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -55,7 +55,7 @@ jobs: EOF - name: Initialize CodeQL - uses: github/codeql-action/init@v3 + uses: github/codeql-action/init@v4 with: languages: ${{ matrix.language }} build-mode: manual