File tree Expand file tree Collapse file tree 1 file changed +16
-10
lines changed Expand file tree Collapse file tree 1 file changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -39,20 +39,26 @@ jobs:
39
39
docker build --file ./${{ steps.short-version.outputs.result }}/${{ matrix.variant }}/Dockerfile --tag node:${{ matrix.version }}-${{ matrix.variant }} .
40
40
41
41
- name : Test for node version
42
+ shell : pwsh
42
43
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
+
47
50
- name : Verify entrypoint runs regular, non-executable files with node
51
+ shell : pwsh
48
52
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
+
54
60
- name : Test for npm
55
61
run : docker run --rm node:${{ matrix.version }}-${{ matrix.variant }} npm --version
56
-
62
+
57
63
- name : Test for yarn
58
64
run : docker run --rm node:${{ matrix.version }}-${{ matrix.variant }} yarn --version
You can’t perform that action at this time.
0 commit comments