mirror of
https://code.forgejo.org/actions/setup-go.git
synced 2024-11-05 19:45:49 +00:00
ci: add hostedtoolcache validation on windows
This commit is contained in:
parent
93397bea11
commit
aabcd82874
1 changed files with 26 additions and 1 deletions
27
.github/workflows/windows-validation.yml
vendored
27
.github/workflows/windows-validation.yml
vendored
|
@ -105,10 +105,35 @@ jobs:
|
||||||
fi
|
fi
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: 'Drive D: should not have Go installation, cache: ${{ matrix.cache}}'
|
- name: 'Drive D: should not have Go installation, cache: ${{ matrix.cache }}'
|
||||||
run: |
|
run: |
|
||||||
if [ -e 'D:\hostedtoolcache\windows\go\${{ needs.find-default-go.outputs.version }}\x64' ];then
|
if [ -e 'D:\hostedtoolcache\windows\go\${{ needs.find-default-go.outputs.version }}\x64' ];then
|
||||||
echo 'D:\hostedtoolcache\windows\go\${{ needs.find-default-go.outputs.version }}\x64 should not exist for hosted version of go';
|
echo 'D:\hostedtoolcache\windows\go\${{ needs.find-default-go.outputs.version }}\x64 should not exist for hosted version of go';
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
|
hostedtoolcache:
|
||||||
|
name: 'Validate if hostedtoolcache works as expected'
|
||||||
|
runs-on: windows-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
cache: [false]
|
||||||
|
go: [1.20.1]
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: 'Setup ${{ matrix.go }}, cache: ${{ matrix.cache }}'
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
go-version: ${{ matrix.go }}
|
||||||
|
cache: ${{ matrix.cache }}
|
||||||
|
|
||||||
|
- name: 'Setup ${{ matrix.go }}, cache: ${{ matrix.cache }} (from hostedtoolcache)'
|
||||||
|
uses: ./
|
||||||
|
with:
|
||||||
|
go-version: ${{ matrix.go }}
|
||||||
|
cache: ${{ matrix.cache }}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue