mirror of
https://github.com/actions/setup-dotnet.git
synced 2024-11-23 03:51:07 +07:00
Debug
This commit is contained in:
parent
1c7be1087d
commit
4a01d86a5b
6
.github/workflows/workflow.yml
vendored
6
.github/workflows/workflow.yml
vendored
@ -169,8 +169,7 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
NUGET_AUTH_TOKEN: NOTATOKEN
|
NUGET_AUTH_TOKEN: NOTATOKEN
|
||||||
- name: Verify dotnet
|
- name: Verify dotnet
|
||||||
shell: pwsh
|
run: __tests__/verify-dotnet.sh 3.1.201
|
||||||
run: __tests__/verify-dotnet.ps1 3.1.201
|
|
||||||
|
|
||||||
test-bypass-proxy:
|
test-bypass-proxy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -190,5 +189,4 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
NUGET_AUTH_TOKEN: NOTATOKEN
|
NUGET_AUTH_TOKEN: NOTATOKEN
|
||||||
- name: Verify dotnet
|
- name: Verify dotnet
|
||||||
shell: pwsh
|
run: __tests__/verify-dotnet.sh 3.1.201
|
||||||
run: __tests__/verify-dotnet.ps1 3.1.201
|
|
||||||
|
44
__tests__/verify-dotnet.sh
Normal file
44
__tests__/verify-dotnet.sh
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
if [ -z "$1" ]; then
|
||||||
|
echo "Must supply dotnet version argument"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -f "../nuget.config" ]; then
|
||||||
|
echo "nuget file not generated correctly"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
dotnet_version="$(dotnet --version)"
|
||||||
|
echo "Found dotnet version '$dotnet_version'"
|
||||||
|
if [ -z "$(echo $dotnet_version | grep $1)" ]; then
|
||||||
|
echo "Unexpected version"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$2" ]; then
|
||||||
|
dotnet_version="$(dotnet --list-sdks)"
|
||||||
|
echo "Found dotnet version '$dotnet_version'"
|
||||||
|
if [ -z "$(echo $dotnet_version | grep $2)" ]; then
|
||||||
|
echo "Unexpected version"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Building sample csproj"
|
||||||
|
dotnet build __tests__/sample-csproj/ --no-cache || exit 1
|
||||||
|
|
||||||
|
echo "Testing compiled app"
|
||||||
|
sample_output=$(dotnet test __tests__/sample-csproj/ --no-build)
|
||||||
|
echo "Sample output: $sample_output"
|
||||||
|
# For Side-by-Side installs we want to run the tests twice, for a single install the tests will run once
|
||||||
|
if [ -n "$2" ]; then
|
||||||
|
if [ -z "$(echo $sample_output | grep "Test Run Successful.*Test Run Successful.")" ]; then
|
||||||
|
echo "Unexpected output"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
if [ -z "$(echo $sample_output | grep "Test Run Successful.")" ]; then
|
||||||
|
echo "Unexpected output"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user