11# This workflow will build a .NET project
22# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net
3-
43name : build-and-test-workflow
5-
64on :
75 push :
86 branches : [ "master" ]
97 pull_request :
108 branches : [ "master" ]
11-
129jobs :
1310 build :
1411 runs-on : windows-latest
@@ -17,23 +14,37 @@ jobs:
1714
1815 - name : Setup MSBuild
1916 uses : microsoft/setup-msbuild@v1.3.1
20-
17+
2118 - name : Setup VSTest
2219 uses : darenm/Setup-VSTest@v1.2
23-
20+
2421 - name : Setup NuGet
2522 uses : NuGet/setup-nuget@v1.2.0
2623
24+ - name : Install .NET Framework Targeting Packs
25+ shell : powershell
26+ run : |
27+ choco install netfx-4.0-devpack --yes --no-progress
28+ choco install netfx-4.5-devpack --yes --no-progress
29+ choco install netfx-4.5.1-devpack --yes --no-progress
30+ choco install netfx-4.5.2-devpack --yes --no-progress
31+ choco install netfx-4.6-devpack --yes --no-progress
32+ choco install netfx-4.6.1-devpack --yes --no-progress
33+ choco install netfx-4.7-devpack --yes --no-progress
34+ choco install netfx-4.7.1-devpack --yes --no-progress
35+ choco install netfx-4.7.2-devpack --yes --no-progress
36+ choco install netfx-4.8-devpack --yes --no-progress
37+
2738 - name : Restore NuGet packages
2839 run : nuget restore RandomString4Net.sln
2940
3041 - name : Build RandomString4Net for Release
3142 run : msbuild RandomString4Net.sln -property:Configuration=Release -property:platform="Any CPU"
32-
43+
3344 - name : Run Tests
3445 run : vstest.console.exe .\RandomString4NetTest\bin\Release\RandomString4NetTest.dll
3546
3647 - name : Upload coverage reports to Codecov
3748 uses : codecov/codecov-action@v3
3849 env :
39- CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
50+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
0 commit comments