v1.10.0 - updated github workflow path to install .net frameworks #49
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This workflow will build a .NET project | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-net | |
| name: build-and-test-workflow | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v4.1.1 | |
| - name: Setup MSBuild | |
| uses: microsoft/setup-msbuild@v1.3.1 | |
| - name: Setup VSTest | |
| uses: darenm/Setup-VSTest@v1.2 | |
| - name: Setup NuGet | |
| uses: NuGet/setup-nuget@v1.2.0 | |
| - name: Install .NET Framework Targeting Packs | |
| shell: powershell | |
| run: | | |
| choco install netfx-4.0-devpack --yes --no-progress | |
| choco install netfx-4.5-devpack --yes --no-progress | |
| choco install netfx-4.5.1-devpack --yes --no-progress | |
| choco install netfx-4.5.2-devpack --yes --no-progress | |
| choco install netfx-4.6-devpack --yes --no-progress | |
| choco install netfx-4.6.1-devpack --yes --no-progress | |
| choco install netfx-4.7-devpack --yes --no-progress | |
| choco install netfx-4.7.1-devpack --yes --no-progress | |
| choco install netfx-4.7.2-devpack --yes --no-progress | |
| choco install netfx-4.8-devpack --yes --no-progress | |
| - name: Restore NuGet packages | |
| run: nuget restore RandomString4Net.sln | |
| - name: Build RandomString4Net for Release | |
| run: msbuild RandomString4Net.sln -property:Configuration=Release -property:platform="Any CPU" | |
| - name: Run Tests | |
| run: vstest.console.exe .\RandomString4NetTest\bin\Release\RandomString4NetTest.dll | |
| - name: Upload coverage reports to Codecov | |
| uses: codecov/codecov-action@v3 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |