Skip to content

[DO NOT MERGE] Test enable win CLI test #5159

[DO NOT MERGE] Test enable win CLI test

[DO NOT MERGE] Test enable win CLI test #5159

Workflow file for this run

name: "Pull Request CI"
on:
- pull_request
jobs:
windows-build-jvm-latest:
name: PR - Windows - JVM build - Latest Version
runs-on: windows-latest
strategy:
matrix:
java: [ 21 ]
outputs:
has-flaky-tests: ${{steps.flaky-test-detector.outputs.has-flaky-tests}}
steps:
- name: Set UTF8
shell: pwsh
run: |
$linesToWrite = @"
@ECHO OFF
CHCP 65001
"@
New-Item -Path "$env:USERPROFILE\test.bat" -ItemType File
Set-Content -Path "$env:USERPROFILE\test.bat" -Value $linesToWrite
get-content "$env:USERPROFILE\test.bat"
cd $env:USERPROFILE
./test.bat
- uses: actions/checkout@v4
- name: Install JDK {{ matrix.java }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
check-latest: true
cache: 'maven'
- name: Build Quarkus CLI
shell: pwsh
run: |
Invoke-WebRequest https://s01.oss.sonatype.org/content/repositories/snapshots/io/quarkus/quarkus-cli/999-SNAPSHOT/quarkus-cli-999-20241209.023002-1284-runner.jar -OutFile "$env:USERPROFILE\quarkus-cli-999-SNAPSHOT-runner.jar"
- name: Set setting file
shell: pwsh
run: |
Copy-Item -Path .github\quarkus-snapshots-mvn-settings.xml -Destination "$env:USERPROFILE\.m2\settings.xml"
- name: Install Quarkus CLI
shell: pwsh
run: |
New-Item -Path "$env:USERPROFILE\quarkus-dev-cli.bat" -ItemType File
Set-Content -Path "$env:USERPROFILE\quarkus-dev-cli.bat" -Value 'java -jar "%homedrive%%homepath%\quarkus-cli-999-SNAPSHOT-runner.jar" %*'
get-content "$env:USERPROFILE\quarkus-dev-cli.bat"
cd "$env:USERPROFILE"
./quarkus-dev-cli.bat version "-Dquarkus.analytics.disabled=true"
- name: Build in JVM mode
shell: bash
run: |
mvn -B --no-transfer-progress -fae -Dreruns=0 -s .github/quarkus-snapshots-mvn-settings.xml clean verify -am "-Dinclude.quarkus-cli-tests" -f quarkus-cli "-Dts.quarkus.cli.cmd=C:\Users\runneradmin\quarkus-dev-cli.bat" "-Dts.disable-on-win-without-lang-pack"
- name: Detect flaky tests
id: flaky-test-detector
if: ${{ hashFiles('**/flaky-run-report.json') != '' }}
shell: bash
run: echo "has-flaky-tests=true" >> "$GITHUB_OUTPUT"
- name: Rename flaky test run report to avoid file name conflicts
id: rename-flaky-test-run-report
if: ${{ hashFiles('**/flaky-run-report.json') != '' }}
shell: bash
run: mv target/flaky-run-report.json target/flaky-run-report-windows-jvm-latest.json
- name: Archive flaky run report
id: archive-flaky-run-report
if: ${{ hashFiles('**/flaky-run-report-windows-jvm-latest.json') != '' }}
uses: actions/upload-artifact@v4
with:
name: flaky-run-report-windows-jvm-latest
path: target/flaky-run-report-windows-jvm-latest.json
- name: Zip Artifacts
shell: bash
if: failure()
run: |
# Disambiguate windows find from cygwin find
/usr/bin/find . -name '*-reports/*' -type d | tar -czf artifacts-latest-windows-jvm${{ matrix.java }}.tar.gz -T -
- name: Archive artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: artifacts-latest-windows-jvm${{ matrix.java }}
path: artifacts-latest-windows-jvm${{ matrix.java }}.tar.gz