Skip to content

Commit aabcd82

Browse files
authored
ci: add hostedtoolcache validation on windows
1 parent 93397be commit aabcd82

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

.github/workflows/windows-validation.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,35 @@ jobs:
105105
fi
106106
shell: bash
107107

108-
- name: 'Drive D: should not have Go installation, cache: ${{ matrix.cache}}'
108+
- name: 'Drive D: should not have Go installation, cache: ${{ matrix.cache }}'
109109
run: |
110110
if [ -e 'D:\hostedtoolcache\windows\go\${{ needs.find-default-go.outputs.version }}\x64' ];then
111111
echo 'D:\hostedtoolcache\windows\go\${{ needs.find-default-go.outputs.version }}\x64 should not exist for hosted version of go';
112112
exit 1
113113
fi
114114
shell: bash
115+
116+
hostedtoolcache:
117+
name: 'Validate if hostedtoolcache works as expected'
118+
runs-on: windows-latest
119+
strategy:
120+
matrix:
121+
cache: [false]
122+
go: [1.20.1]
123+
steps:
124+
- uses: actions/checkout@v3
125+
126+
- name: 'Setup ${{ matrix.go }}, cache: ${{ matrix.cache }}'
127+
uses: ./
128+
with:
129+
go-version: ${{ matrix.go }}
130+
cache: ${{ matrix.cache }}
131+
132+
- name: 'Setup ${{ matrix.go }}, cache: ${{ matrix.cache }} (from hostedtoolcache)'
133+
uses: ./
134+
with:
135+
go-version: ${{ matrix.go }}
136+
cache: ${{ matrix.cache }}
137+
138+
139+

0 commit comments

Comments
 (0)