Skip to content

Commit 8867ddb

Browse files
authored
remove windows gubbins from container tests
1 parent 945d849 commit 8867ddb

File tree

1 file changed

+2
-69
lines changed

1 file changed

+2
-69
lines changed

.github/workflows/tests.yaml

Lines changed: 2 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,7 @@ jobs:
196196
version: '${{ matrix.version }}'
197197
force: '${{ matrix.force }}'
198198

199-
- name: Check jq - Unix-ish
200-
if: (runner.os == 'Linux' || runner.os == 'macOS') && matrix.force == 'true'
199+
- name: Check jq
201200
# language=sh
202201
run: |
203202
_err=
@@ -217,8 +216,7 @@ jobs:
217216
fi
218217
if [ -n "${_err}" ]; then exit 1; fi;
219218
220-
- name: Check Outputs - Unix-ish
221-
if: runner.os == 'Linux' || runner.os == 'macOS'
219+
- name: Check Outputs
222220
# language=sh
223221
run: |
224222
_installed='${{ steps.install-jq.outputs.installed }}'
@@ -251,68 +249,3 @@ jobs:
251249
fi
252250
fi
253251
if [ -n "${_err}" ]; then exit 1; fi;
254-
255-
256-
- name: Check jq - Windows-ish
257-
if: runner.os == 'Windows' && matrix.force == 'true'
258-
# language=powershell
259-
run: |
260-
Get-Command "jq.exe"
261-
$_cmd={jq.exe --version }
262-
$_vers=jq.exe --version 2>&1
263-
if ( "${_vers}" -ne "jq-${{ matrix.version }}" -and "${_vers}" -ne "jq-${{ matrix.version }}-dirty" )
264-
{
265-
Write-Host "jq.exe --version returned unexpected value"
266-
Write-Host " Expected: jq-${{ matrix.version }}"
267-
Write-Host " Actual: ${_vers}"
268-
exit 1
269-
}
270-
271-
- name: Check Outputs - Windows-ish
272-
if: runner.os == 'Windows'
273-
shell: powershell
274-
# language=powershell
275-
run: |
276-
$ErrorActionPreference = 'Stop'
277-
Set-StrictMode -Version Latest
278-
$_installed='${{ steps.install-jq.outputs.installed }}'
279-
$_err = 0
280-
if ("${{ matrix.force }}" -eq "true")
281-
{
282-
# enabling "force" must result in an install
283-
if ("${{ steps.install-jq.outputs.installed }}" -ne "true")
284-
{
285-
Write-Host "Unexpected value for installed"
286-
Write-Host "Expected: true"
287-
Write-Host "Actual: ${{ steps.install-jq.outputs.installed }}"
288-
$_err=1
289-
}
290-
}
291-
else
292-
{
293-
if ("${{ steps.install-jq.outputs.found }}" -eq "true")
294-
{
295-
# if found, must not be installed without force
296-
if ("${{ steps.install-jq.outputs.installed }}" -ne "false")
297-
{
298-
Write-Host "Unexpected value for installed"
299-
Write-Host "Expected: false"
300-
Write-Host "Actual: ${{ steps.install-jq.outputs.installed }}"
301-
$_err=1
302-
}
303-
}
304-
else
305-
{
306-
# if not found, must be installed
307-
if ("${{ steps.install-jq.outputs.installed }}" -ne "true") {
308-
Write-Host "Unexpected value for installed"
309-
Write-Host "Expected: true"
310-
Write-Host "Actual: ${{ steps.install-jq.outputs.installed }}"
311-
$_err=1
312-
}
313-
}
314-
}
315-
if ("${_err}" -ne 0)
316-
{
317-
exit 1
318-
}

0 commit comments

Comments
 (0)