Skip to content

Commit d6d1ee4

Browse files
committed
test hosted version of go
1 parent 96a9554 commit d6d1ee4

File tree

1 file changed

+21
-2
lines changed

1 file changed

+21
-2
lines changed

.github/workflows/windows-validation.yml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Basic validation
1+
name: validate Windows installation
22

33
on:
44
push:
@@ -16,7 +16,8 @@ jobs:
1616
strategy:
1717
matrix:
1818
cache: [false, true]
19-
go: [1.20.1]
19+
go: [1.20.1, 1.20.5]
20+
name: 'Setup ${{ matrix.go }} cache: ${{ matrix.cache }}'
2021
steps:
2122
- uses: actions/checkout@v3
2223

@@ -26,6 +27,23 @@ jobs:
2627
cache: ${{ matrix.cache }}
2728
name: v4-cache-${{ matrix.cache }}
2829

30+
- run: |
31+
if [ -e 'D:\hostedtoolcache\windows\go\${{ matrix.go }}\x64' ];then
32+
echo 'D:\hostedtoolcache\windows\go\${{ matrix.go }}\x64 must not exist for hosted version of go';
33+
exit 1
34+
fi
35+
36+
du -m -s 'C:\hostedtoolcache\windows\go\${{ matrix.go }}\x64'
37+
# make sure drive c: contains the folder
38+
size=$(du -m -s 'C:\hostedtoolcache\windows\go\${{ matrix.go }}\x64'|cut -f1 -d$'\t')
39+
if [ $size -eq 0 ];then
40+
echo 'Size of the hosted go installed on drive c: must be above zero'
41+
exit 1
42+
fi
43+
shell: bash
44+
name: Hosted go should not have link
45+
if: ${{ matrix.go == '1.20.5' }}
46+
2947
- run: |
3048
du -m -s 'D:\hostedtoolcache\windows\go\${{ matrix.go }}\x64'
3149
size=$(du -m -s 'D:\hostedtoolcache\windows\go\${{ matrix.go }}\x64'|cut -f1 -d$'\t')
@@ -44,6 +62,7 @@ jobs:
4462
fi
4563
shell: bash
4664
name: Disk usage
65+
if: ${{ matrix.go != '1.20.5' }}
4766
4867
- run: |
4968
echo $PATH

0 commit comments

Comments
 (0)