File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -39,20 +39,26 @@ jobs:
3939 docker build --file ./${{ steps.short-version.outputs.result }}/${{ matrix.variant }}/Dockerfile --tag node:${{ matrix.version }}-${{ matrix.variant }} .
4040
4141 - name : Test for node version
42+ shell : pwsh
4243 run : |
43- image_node_version=$(docker run --rm node:${{ matrix.version }}-${{ matrix.variant }} node --print "process.versions.node")
44- echo "Expected: \"${{ matrix.version }}\", Got: \"${image_node_version}\""
45- [ "${image_node_version}" == "${{ matrix.version }}" ]
46-
44+ $image_node_version = (docker run --rm node:${{ matrix.version }}-${{ matrix.variant }} node --print "process.versions.node")
45+ Write-Host "Expected: '${{ matrix.version }}', Got: '$image_node_version'"
46+ if ($image_node_version -ne ${{ matrix.version }}) {
47+ exit 1
48+ }
49+
4750 - name : Verify entrypoint runs regular, non-executable files with node
51+ shell : pwsh
4852 run : |
49- tmp_file=$(mktemp)
50- echo 'console.log("success")' > "${tmp_file}"
51- output=$(docker run --rm -v "${tmp_file}:/app/index.js" node:${{ matrix.version }}-${{ matrix.variant }} app/index.js)
52- [ "${output}" = 'success' ]
53-
53+ $tmp_file = New-TemporaryFile
54+ "console.log('success')" | Out-File -FilePath $tmp_file -Encoding utf8
55+ $output = (docker run --rm -v "${{ github.workspace }}\$tmp_file:/app/index.js" node:${{ matrix.version }}-${{ matrix.variant }} app/index.js)
56+ if ($output -ne 'success') {
57+ exit 1
58+ }
59+
5460 - name : Test for npm
5561 run : docker run --rm node:${{ matrix.version }}-${{ matrix.variant }} npm --version
56-
62+
5763 - name : Test for yarn
5864 run : docker run --rm node:${{ matrix.version }}-${{ matrix.variant }} yarn --version
You can’t perform that action at this time.
0 commit comments