Skip to content

Commit

Permalink
remove windows gubbins from container tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dcarbone committed Nov 7, 2023
1 parent 945d849 commit 8867ddb
Showing 1 changed file with 2 additions and 69 deletions.
71 changes: 2 additions & 69 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,7 @@ jobs:
version: '${{ matrix.version }}'
force: '${{ matrix.force }}'

- name: Check jq - Unix-ish
if: (runner.os == 'Linux' || runner.os == 'macOS') && matrix.force == 'true'
- name: Check jq
# language=sh
run: |
_err=
Expand All @@ -217,8 +216,7 @@ jobs:
fi
if [ -n "${_err}" ]; then exit 1; fi;
- name: Check Outputs - Unix-ish
if: runner.os == 'Linux' || runner.os == 'macOS'
- name: Check Outputs
# language=sh
run: |
_installed='${{ steps.install-jq.outputs.installed }}'
Expand Down Expand Up @@ -251,68 +249,3 @@ jobs:
fi
fi
if [ -n "${_err}" ]; then exit 1; fi;
- name: Check jq - Windows-ish
if: runner.os == 'Windows' && matrix.force == 'true'
# language=powershell
run: |
Get-Command "jq.exe"
$_cmd={jq.exe --version }
$_vers=jq.exe --version 2>&1
if ( "${_vers}" -ne "jq-${{ matrix.version }}" -and "${_vers}" -ne "jq-${{ matrix.version }}-dirty" )
{
Write-Host "jq.exe --version returned unexpected value"
Write-Host " Expected: jq-${{ matrix.version }}"
Write-Host " Actual: ${_vers}"
exit 1
}
- name: Check Outputs - Windows-ish
if: runner.os == 'Windows'
shell: powershell
# language=powershell
run: |
$ErrorActionPreference = 'Stop'
Set-StrictMode -Version Latest
$_installed='${{ steps.install-jq.outputs.installed }}'
$_err = 0
if ("${{ matrix.force }}" -eq "true")
{
# enabling "force" must result in an install
if ("${{ steps.install-jq.outputs.installed }}" -ne "true")
{
Write-Host "Unexpected value for installed"
Write-Host "Expected: true"
Write-Host "Actual: ${{ steps.install-jq.outputs.installed }}"
$_err=1
}
}
else
{
if ("${{ steps.install-jq.outputs.found }}" -eq "true")
{
# if found, must not be installed without force
if ("${{ steps.install-jq.outputs.installed }}" -ne "false")
{
Write-Host "Unexpected value for installed"
Write-Host "Expected: false"
Write-Host "Actual: ${{ steps.install-jq.outputs.installed }}"
$_err=1
}
}
else
{
# if not found, must be installed
if ("${{ steps.install-jq.outputs.installed }}" -ne "true") {
Write-Host "Unexpected value for installed"
Write-Host "Expected: true"
Write-Host "Actual: ${{ steps.install-jq.outputs.installed }}"
$_err=1
}
}
}
if ("${_err}" -ne 0)
{
exit 1
}

0 comments on commit 8867ddb

Please sign in to comment.