From 9f3b139d8b4eb7d2d32649a15204e1abe5b78dbb Mon Sep 17 00:00:00 2001 From: Jakub Jedlicka Date: Tue, 10 Dec 2024 23:50:41 +0100 Subject: [PATCH] Add CLI SNAPSHOT testing to windows pipepline --- .github/workflows/ci.yml | 19 ++++++++++++++++++- .github/workflows/daily.yaml | 19 ++++++++++++++++++- 2 files changed, 36 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 71af4bc0a..440965c16 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -247,10 +247,27 @@ jobs: java-version: ${{ matrix.java }} check-latest: true cache: 'maven' + - name: Set up Maven settings.xml + run: Copy-Item -Path ".github/quarkus-snapshots-mvn-settings.xml" -Destination "$env:USERPROFILE/.m2/settings.xml" + - name: Download Quarkus CLI + shell: bash + run: mvn -B --no-transfer-progress org.apache.maven.plugins:maven-dependency-plugin:get -Dartifact=io.quarkus:quarkus-cli:999-SNAPSHOT:jar:runner + - name: Install Quarkus CLI + run: | + $quarkusCliFileContent = @" + @ECHO OFF + java -jar %HOMEDRIVE%%HOMEPATH%\.m2\repository\io\quarkus\quarkus-cli\999-SNAPSHOT\quarkus-cli-999-SNAPSHOT-runner.jar %* + "@ + New-Item -Path "$(pwd)\quarkus-dev-cli.bat" -ItemType File + Set-Content -Path "$(pwd)\quarkus-dev-cli.bat" -Value $quarkusCliFileContent + ./quarkus-dev-cli.bat version - name: Build in JVM mode shell: bash run: | - mvn -B --no-transfer-progress -fae -s .github/quarkus-snapshots-mvn-settings.xml clean verify ${{ matrix.module-mvn-args }} -am + # Need to set UTF-8 as otherwise the cp1252 is used on GH windows runner + # TODO revisit this with Windows 2025 when available or when we move testing to JDK 21+ only + export JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8" + mvn -B --no-transfer-progress -fae -s .github/quarkus-snapshots-mvn-settings.xml clean verify ${{ matrix.module-mvn-args }} -am -D"include.quarkus-cli-tests" -D"ts.quarkus.cli.cmd=$(pwd)\quarkus-dev-cli.bat" -D"gh-action-disable-on-win" - name: Detect flaky tests id: flaky-test-detector if: ${{ hashFiles('**/flaky-run-report.json') != '' }} diff --git a/.github/workflows/daily.yaml b/.github/workflows/daily.yaml index bc4f414ae..3990c8395 100644 --- a/.github/workflows/daily.yaml +++ b/.github/workflows/daily.yaml @@ -92,10 +92,27 @@ jobs: distribution: 'temurin' java-version: ${{ matrix.java }} check-latest: true + - name: Set up Maven settings.xml + run: Copy-Item -Path ".github/quarkus-snapshots-mvn-settings.xml" -Destination "$env:USERPROFILE/.m2/settings.xml" + - name: Download Quarkus CLI + shell: bash + run: mvn -B --no-transfer-progress org.apache.maven.plugins:maven-dependency-plugin:get -Dartifact=io.quarkus:quarkus-cli:999-SNAPSHOT:jar:runner + - name: Install Quarkus CLI + run: | + $quarkusCliFileContent = @" + @ECHO OFF + java -jar %HOMEDRIVE%%HOMEPATH%\.m2\repository\io\quarkus\quarkus-cli\999-SNAPSHOT\quarkus-cli-999-SNAPSHOT-runner.jar %* + "@ + New-Item -Path "$(pwd)\quarkus-dev-cli.bat" -ItemType File + Set-Content -Path "$(pwd)\quarkus-dev-cli.bat" -Value $quarkusCliFileContent + ./quarkus-dev-cli.bat version - name: Build in JVM mode shell: bash run: | - mvn -B --no-transfer-progress -fae -s .github/quarkus-snapshots-mvn-settings.xml clean verify + # Need to set UTF-8 as otherwise the cp1252 is used on GH windows runner + # TODO revisit this with Windows 2025 when available or when we move testing to JDK 21+ only + export JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8" + mvn -B --no-transfer-progress -fae -s .github/quarkus-snapshots-mvn-settings.xml clean verify -D"include.quarkus-cli-tests" -D"ts.quarkus.cli.cmd=$(pwd)\quarkus-dev-cli.bat" -D"gh-action-disable-on-win" - name: Zip Artifacts shell: bash if: failure()