From 88a8d992773e7882cfad02fdc27426ef46a82c81 Mon Sep 17 00:00:00 2001 From: Owen Smith Date: Thu, 14 Apr 2022 09:29:03 -0400 Subject: [PATCH] add test workflow jobs for global.json usage --- .github/workflows/workflow.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 34b7183..d2dcede 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -163,6 +163,32 @@ jobs: shell: pwsh run: __tests__/verify-dotnet.ps1 3.1 2.2 + test-setup-global-json-specified-and-version: + runs-on: ${{ matrix.operating-system }} + strategy: + fail-fast: false + matrix: + operating-system: [ubuntu-latest, windows-latest, macOS-latest] + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Clear toolcache + shell: pwsh + run: __tests__/clear-toolcache.ps1 ${{ runner.os }} + - name: Write global.json + shell: bash + run: | + mkdir subdirectory + echo '{"sdk":{"version": "2.2","rollForward": "latestFeature"}}' > ./subdirectory/global.json + - name: Setup dotnet + uses: ./ + with: + dotnet-version: 3.1 + global-json-file: ./subdirectory/global.json + - name: Verify dotnet + shell: pwsh + run: __tests__/verify-dotnet.ps1 2.2 3.1 + test-proxy: runs-on: ubuntu-latest container: