This commit is contained in:
Vladimir Safonkin 2021-02-03 15:54:50 +03:00
parent 10ad86dc12
commit 9d49fb8e98
2 changed files with 30 additions and 17 deletions

View File

@ -99,10 +99,10 @@ jobs:
# shell: bash
# run: |
# echo "DOTNET_INSTALL_DIR=$LocalAppData\Microsoft\dotnet2" >> $GITHUB_ENV
# 2.0, 3.0, 5.0 needs to be in single quotes to interpret as a string instead of as an integer
- name: Clear installed dotnet versions
shell: pwsh
run: __tests__/clear-installed-dotnet.ps1 ${{ runner.os }}
# 2.0, 3.0, 5.0 needs to be in single quotes to interpret as a string instead of as an integer
- name: Setup dotnet '3.1'
uses: ./
with:
@ -115,23 +115,32 @@ jobs:
run: __tests__/verify-dotnet.ps1 3.1
# Clear cache before .x version install
- name: Set new tool cache (macOS)
if: runner.os == 'macos'
run: |
echo "DOTNET_INSTALL_DIR=/Users/runner/.dotnet3" >> $GITHUB_ENV
- name: Set new tool cache (Ubuntu)
if: runner.os == 'linux'
run: |
echo "DOTNET_INSTALL_DIR=/home/runner/.dotnet3" >> $GITHUB_ENV
- name: Set new tool cache (Windows)
if: runner.os == 'windows'
shell: bash
run: |
echo "DOTNET_INSTALL_DIR=$LocalAppData\Microsoft\dotnet3" >> $GITHUB_ENV
- name: Setup dotnet 2.0.x
# - name: Set new tool cache (macOS)
# if: runner.os == 'macos'
# run: |
# echo "DOTNET_INSTALL_DIR=/Users/runner/.dotnet3" >> $GITHUB_ENV
# - name: Set new tool cache (Ubuntu)
# if: runner.os == 'linux'
# run: |
# echo "DOTNET_INSTALL_DIR=/home/runner/.dotnet3" >> $GITHUB_ENV
# - name: Set new tool cache (Windows)
# if: runner.os == 'windows'
# shell: bash
# run: |
# echo "DOTNET_INSTALL_DIR=$LocalAppData\Microsoft\dotnet3" >> $GITHUB_ENV
- name: Clear installed dotnet versions
shell: pwsh
run: __tests__/clear-installed-dotnet.ps1 ${{ runner.os }}
- name: Setup dotnet 3.1.x
uses: ./
with:
dotnet-version: 2.0.x
dotnet-version: 3.1.x
- name: Verify dotnet
if: runner.os != 'windows'
run: __tests__/verify-dotnet.sh 3.1
- name: Verify dotnet (Windows)
if: runner.os == 'windows'
run: __tests__/verify-dotnet.ps1 3.1
# Clear cache before .* version install
- name: Set new tool cache (macOS)

View File

@ -24,4 +24,8 @@ foreach ($path in $pathsToClear) {
}
}
try {
dotnet --info
} catch {
Write-Host "Dotnet was removed successfully"
}