@@ -2,10 +2,14 @@ name: Main workflow
22
33on :
44 pull_request :
5+ paths-ignore :
6+ - ' **.md'
57 push :
68 branches :
79 - main
810 - releases/*
11+ paths-ignore :
12+ - ' **.md'
913
1014jobs :
1115 build :
2933 if : runner.os != 'windows'
3034 run : __tests__/verify-no-unstaged-changes.sh
3135
32- test :
36+ test-setup-full-version :
3337 runs-on : ${{ matrix.operating-system }}
3438 strategy :
3539 fail-fast : false
3842 steps :
3943 - name : Checkout
4044 uses : actions/checkout@v2
41- - name : Clear tool cache (macOS)
42- if : runner.os == 'macos'
43- run : |
44- echo $PATH
45- dotnet --info
46- rm -rf "/Users/runner/.dotnet"
47- - name : Clear tool cache (Ubuntu)
48- if : runner.os == 'linux'
49- run : |
50- echo $PATH
51- dotnet --info
52- rm -rf "/usr/share/dotnet"
53- - name : Clear tool cache (Windows)
54- if : runner.os == 'windows'
55- run : |
56- echo $env:PATH
57- dotnet --info
58- Remove-Item $env:LocalAppData\Microsoft\dotnet/* -Recurse -Force -ErrorAction SilentlyContinue
59- Remove-Item "$env:ProgramFiles\dotnet/*" -Recurse -Force -ErrorAction SilentlyContinue
45+ - name : Clear toolcache
46+ shell : pwsh
47+ run : __tests__/clear-toolcache.ps1 ${{ runner.os }}
6048 # Side-by-side install of 2.2 and 3.1 used for the test project
6149 - name : Setup dotnet 2.2.402
6250 uses : ./
@@ -70,70 +58,86 @@ jobs:
7058 source-url : https://api.nuget.org/v3/index.json
7159 env :
7260 NUGET_AUTH_TOKEN : NOTATOKEN
61+ - name : Verify nuget config file
62+ shell : pwsh
63+ run : |
64+ if (-Not (Test-Path "../nuget.config")) { throw "nuget file not generated correctly" }
7365 - name : Verify dotnet
74- if : runner.os != 'windows'
75- run : __tests__/verify-dotnet.sh 3.1.201 2.2.402
76- - name : Verify dotnet (Windows)
77- if : runner.os == 'windows'
66+ shell : pwsh
7867 run : __tests__/verify-dotnet.ps1 3.1.201 2.2.402
7968
80- # Set new cache before 2 digit install
81- - name : Set new tool cache (macOS)
82- if : runner.os == 'macos'
83- run : |
84- echo "DOTNET_INSTALL_DIR=/Users/runner/.dotnet2" >> $GITHUB_ENV
85- - name : Set new tool cache (Ubuntu)
86- if : runner.os == 'linux'
87- run : |
88- echo "DOTNET_INSTALL_DIR=/home/runner/.dotnet2" >> $GITHUB_ENV
89- - name : Set new tool cache (Windows)
90- if : runner.os == 'windows'
91- shell : bash
92- run : |
93- echo "DOTNET_INSTALL_DIR=$LocalAppData\Microsoft\dotnet2" >> $GITHUB_ENV
69+ test-setup-without-patch-version :
70+ runs-on : ${{ matrix.operating-system }}
71+ strategy :
72+ fail-fast : false
73+ matrix :
74+ operating-system : [ubuntu-latest, windows-latest, macOS-latest]
75+ steps :
76+ - name : Checkout
77+ uses : actions/checkout@v2
78+ - name : Clear toolcache
79+ shell : pwsh
80+ run : __tests__/clear-toolcache.ps1 ${{ runner.os }}
9481 # 2.0, 3.0, 5.0 needs to be in single quotes to interpret as a string instead of as an integer
95- - name : Setup dotnet '2.0 '
82+ - name : Setup dotnet '3.1 '
9683 uses : ./
9784 with :
98- dotnet-version : ' 2.0'
99-
100- # Clear cache before .x version install
101- - name : Set new tool cache (macOS)
102- if : runner.os == 'macos'
103- run : |
104- echo "DOTNET_INSTALL_DIR=/Users/runner/.dotnet3" >> $GITHUB_ENV
105- - name : Set new tool cache (Ubuntu)
106- if : runner.os == 'linux'
107- run : |
108- echo "DOTNET_INSTALL_DIR=/home/runner/.dotnet3" >> $GITHUB_ENV
109- - name : Set new tool cache (Windows)
110- if : runner.os == 'windows'
111- shell : bash
112- run : |
113- echo "DOTNET_INSTALL_DIR=$LocalAppData\Microsoft\dotnet3" >> $GITHUB_ENV
114- - name : Setup dotnet 2.0.x
85+ dotnet-version : ' 3.1'
86+ - name : Setup dotnet '2.2'
11587 uses : ./
11688 with :
117- dotnet-version : 2.0.x
89+ dotnet-version : ' 2.2'
90+ - name : Verify dotnet
91+ shell : pwsh
92+ run : __tests__/verify-dotnet.ps1 3.1 2.2
93+
94+ test-setup-latest-patch-version :
95+ runs-on : ${{ matrix.operating-system }}
96+ strategy :
97+ fail-fast : false
98+ matrix :
99+ operating-system : [ubuntu-latest, windows-latest, macOS-latest]
100+ steps :
101+ - name : Checkout
102+ uses : actions/checkout@v2
103+ - name : Clear toolcache
104+ shell : pwsh
105+ run : __tests__/clear-toolcache.ps1 ${{ runner.os }}
106+ - name : Setup dotnet 3.1.x
107+ uses : ./
108+ with :
109+ dotnet-version : 3.1.x
110+ - name : Setup dotnet 2.2.x
111+ uses : ./
112+ with :
113+ dotnet-version : 2.2.x
114+ - name : Verify dotnet
115+ shell : pwsh
116+ run : __tests__/verify-dotnet.ps1 3.1 2.2
118117
119- # Clear cache before .* version install
120- - name : Set new tool cache (macOS)
121- if : runner.os == 'macos'
122- run : |
123- echo "DOTNET_INSTALL_DIR=/Users/runner/.dotnet4" >> $GITHUB_ENV
124- - name : Set new tool cache (Ubuntu)
125- if : runner.os == 'linux'
126- run : |
127- echo "DOTNET_INSTALL_DIR=/home/runner/.dotnet4" >> $GITHUB_ENV
128- - name : Set new tool cache (Windows)
129- if : runner.os == 'windows'
130- shell : bash
131- run : |
132- echo "DOTNET_INSTALL_DIR=$LocalAppData\Microsoft\dotnet4" >> $GITHUB_ENV
133- - name : Setup dotnet 2.0.*
118+ test-setup-with-wildcard :
119+ runs-on : ${{ matrix.operating-system }}
120+ strategy :
121+ fail-fast : false
122+ matrix :
123+ operating-system : [ubuntu-latest, windows-latest, macOS-latest]
124+ steps :
125+ - name : Checkout
126+ uses : actions/checkout@v2
127+ - name : Clear toolcache
128+ shell : pwsh
129+ run : __tests__/clear-toolcache.ps1 ${{ runner.os }}
130+ - name : Setup dotnet 3.1.*
134131 uses : ./
135132 with :
136- dotnet-version : 2.0.*
133+ dotnet-version : 3.1.*
134+ - name : Setup dotnet 2.2.*
135+ uses : ./
136+ with :
137+ dotnet-version : 2.2.*
138+ - name : Verify dotnet
139+ shell : pwsh
140+ run : __tests__/verify-dotnet.ps1 3.1 2.2
137141
138142 test-proxy :
139143 runs-on : ubuntu-latest
0 commit comments