mirror of
https://github.com/actions/setup-go.git
synced 2025-04-23 17:40:50 +00:00
Fix e2e test
This commit is contained in:
parent
d6ad0fa4fe
commit
59c54a4b0b
1 changed files with 8 additions and 7 deletions
15
.github/workflows/windows-validation.yml
vendored
15
.github/workflows/windows-validation.yml
vendored
|
@ -1,4 +1,4 @@
|
||||||
name: validate Windows installation
|
name: Validate Windows installation
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
@ -13,7 +13,7 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
create-link-if-not-default:
|
create-link-if-not-default:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
name: 'Setup ${{ matrix.go }}, cache: ${{ matrix.cache }}'
|
name: 'Validate if symlink is created'
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
cache: [false, true]
|
cache: [false, true]
|
||||||
|
@ -21,7 +21,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: non-default-cache-${{ matrix.cache }}-${{ matrix.go }}
|
- name: 'Setup ${{ matrix.cache }}, cache: ${{ matrix.go }}'
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
go-version: ${{ matrix.go }}
|
go-version: ${{ matrix.go }}
|
||||||
|
@ -81,7 +81,7 @@ jobs:
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
dont-create-link-if-default:
|
dont-create-link-if-default:
|
||||||
name: 'Use default go, cache: ${{ matrix.cache }}'
|
name: 'Validate if symlink is not created for default go'
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
needs: find-default-go
|
needs: find-default-go
|
||||||
strategy:
|
strategy:
|
||||||
|
@ -90,12 +90,13 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- uses: ./
|
- name: 'Setup default go, cache: ${{ matrix.cache }}'
|
||||||
|
uses: ./
|
||||||
with:
|
with:
|
||||||
go-version: ${{ needs.find-default-go.outputs.version }}
|
go-version: ${{ needs.find-default-go.outputs.version }}
|
||||||
cache: ${{ matrix.cache }}
|
cache: ${{ matrix.cache }}
|
||||||
|
|
||||||
- name: 'Drive C: should have Go installation'
|
- name: 'Drive C: should have Go installation, cache: ${{ matrix.cache}}'
|
||||||
run: |
|
run: |
|
||||||
size=$(du -m -s 'C:\hostedtoolcache\windows\go\${{ needs.find-default-go.outputs.version }}\x64'|cut -f1 -d$'\t')
|
size=$(du -m -s 'C:\hostedtoolcache\windows\go\${{ needs.find-default-go.outputs.version }}\x64'|cut -f1 -d$'\t')
|
||||||
if [ $size -eq 0 ];then
|
if [ $size -eq 0 ];then
|
||||||
|
@ -104,7 +105,7 @@ jobs:
|
||||||
fi
|
fi
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: 'Drive D: should not have Go installation'
|
- 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';
|
||||||
|
|
Loading…
Add table
Reference in a new issue