From 36048ec573d844e0e166ffc60b8b9d5cc6b483bf Mon Sep 17 00:00:00 2001 From: Zachary Eisinger Date: Wed, 2 Sep 2020 10:43:18 -0700 Subject: [PATCH] Generate and verify nuget.config --- .github/workflows/workflow.yml | 3 +++ __tests__/verify-dotnet.ps1 | 5 +++++ __tests__/verify-dotnet.sh | 5 +++++ 3 files changed, 13 insertions(+) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index ea946fd..7352b37 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -42,6 +42,7 @@ jobs: uses: ./ with: dotnet-version: 3.0.100 + source-url: https://api.nuget.org/v3/index.json - name: Verify dotnet if: runner.os != 'windows' run: __tests__/verify-dotnet.sh 3.0.100 @@ -70,6 +71,7 @@ jobs: uses: ./ with: dotnet-version: 3.0.100 + source-url: https://api.nuget.org/v3/index.json - name: Verify dotnet run: __tests__/verify-dotnet.sh 3.0.100 @@ -87,5 +89,6 @@ jobs: uses: ./ with: dotnet-version: 3.0.100 + source-url: https://api.nuget.org/v3/index.json - name: Verify dotnet run: __tests__/verify-dotnet.sh 3.0.100 diff --git a/__tests__/verify-dotnet.ps1 b/__tests__/verify-dotnet.ps1 index d3f0303..3885393 100755 --- a/__tests__/verify-dotnet.ps1 +++ b/__tests__/verify-dotnet.ps1 @@ -3,6 +3,11 @@ if (!$args[0]) throw "Must supply dotnet version argument" } +if (!Test-Path "../nuget.config") +{ + throw "nuget file not generated correctly" +} + $dotnet = Get-Command dotnet | Select-Object -First 1 | ForEach-Object { $_.Path } Write-Host "Found '$dotnet'" diff --git a/__tests__/verify-dotnet.sh b/__tests__/verify-dotnet.sh index f314c9a..4ab86be 100755 --- a/__tests__/verify-dotnet.sh +++ b/__tests__/verify-dotnet.sh @@ -3,6 +3,11 @@ if [ -z "$1" ]; then 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