Skip to content

WIP 314 Increase test coverage on mojo Part III #479

WIP 314 Increase test coverage on mojo Part III

WIP 314 Increase test coverage on mojo Part III #479

name: HTML Sanity Check Matrix Test
on:
pull_request:
push:
workflow_dispatch:
env:
GRADLE_DEBUG: ''
jobs:
build-artifacts:
uses: ./.github/workflows/build-artifacts.yml
with:
# SonarQube requires JDK 17 or higher
java-version: '17'
test-java-os-mix:
needs: build-artifacts
strategy:
matrix:
os-version: [ ubuntu-latest, macos-14, windows-latest ]
java-version: [ 8, 11, 17, 21 ]
exclude:
- os-version: macos-14
java-version: 8
runs-on: ${{ matrix.os-version }}
steps:
- name: Detect and Set Debug Mode (Unixes)
if: runner.os != 'Windows'
run: |
if [ "${{ secrets.ACTIONS_RUNNER_DEBUG }}" == "true" ]; then
echo "GRADLE_DEBUG=--debug" >> $GITHUB_ENV
echo "Debug mode is enabled."
else
echo "Debug mode is not enabled."
fi
- name: Detect and Set Debug Mode (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
if ($env:RUNNER_DEBUG) {
"GRADLE_DEBUG=--debug" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
Write-Output "Debug mode is enabled."
} else {
Write-Output "Debug mode is not enabled."
}
- name: Check out
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java-version }}
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
name: build-artifacts
path: .
- name: Make HSC file executable
run: chmod +x htmlSanityCheck-cli/build/install/hsc/bin/hsc
- name: Execute integration tests (Unixes)
if: runner.os != 'Windows'
run: |
uname -a
cd integration-test
../gradlew integrationTest --scan ${GRADLE_DEBUG}
- name: Execute integration tests (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
uname -a
cd ./integration-test/
pwd
cmd /c "echo off && ..\gradlew.bat integrationTest --scan $env:GRADLE_DEBUG"
- name: Collect state upon failure (On Unix)
if: failure() && runner.os != 'Windows'
run: |
echo "Git:"
git status
echo "Env:"
env | sort
echo "PWD:"
pwd
echo "Files:"
find * -ls
./gradlew javaToolchains
- name: Collect state upon failure (On Windows)
if: failure() && runner.os == 'Windows'
shell: pwsh
run: |
echo "Git:"
git status
echo "Env:"
env | sort
$currentDirectory = Get-Location
Write-Output "Current Directory: '$currentDirectory'"
echo "Files:"
$files = Get-ChildItem -Recurse -File
foreach ($file in $files) {
Write-Output $file.FullName
}