Skip to content

Commit

Permalink
test hosted version of go
Browse files Browse the repository at this point in the history
  • Loading branch information
dsame committed Jul 12, 2023
1 parent 96a9554 commit c8f3188
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/windows-validation.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Basic validation
name: validate Windows installation

on:
push:
Expand All @@ -16,7 +16,8 @@ jobs:
strategy:
matrix:
cache: [false, true]
go: [1.20.1]
go: [1.20.1, 1.20.5]
name: 'Setup ${{ matrix.go }} cache: ${{ matrix.cache }}'
steps:
- uses: actions/checkout@v3

Expand All @@ -26,6 +27,24 @@ jobs:
cache: ${{ matrix.cache }}
name: v4-cache-${{ matrix.cache }}

- run: |
find 'D:\hostedtoolcache\windows\go\${{ matrix.go }}\x64'
if [ $? -eq 0 ];then
echo 'D:\hostedtoolcache\windows\go\${{ matrix.go }}\x64 must not exist for hosted version of go';
exit 1
fi
du -m -s 'C:\hostedtoolcache\windows\go\${{ matrix.go }}\x64'
# make sure drive c: contains the folder
size=$(du -m -s 'C:\hostedtoolcache\windows\go\${{ matrix.go }}\x64'|cut -f1 -d$'\t')
if [ $size -eq 0 ];then
echo 'Size of the hosted go installed on drive c: must be above zero'
exit 1
fi
shell: bash
name: Hosted go should not have link
if: ${{ matrix.go == '1.20.5' }}
- run: |
du -m -s 'D:\hostedtoolcache\windows\go\${{ matrix.go }}\x64'
size=$(du -m -s 'D:\hostedtoolcache\windows\go\${{ matrix.go }}\x64'|cut -f1 -d$'\t')
Expand All @@ -44,6 +63,7 @@ jobs:
fi
shell: bash
name: Disk usage
if: ${{ matrix.go != '1.20.5' }}
- run: |
echo $PATH
Expand Down

0 comments on commit c8f3188

Please sign in to comment.