Updated GitHub Actions to latest versions & allowing SonarCloud analysis to run on external pull requests #202
Workflow file for this run
This file contains 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
name: Dotnet Windows build | |
on: [ push, pull_request ] | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup dotnet | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x # SDK Version to use. | |
- name: Setup MSBuild | |
uses: microsoft/setup-msbuild@v2 | |
with: | |
vs-version: 17.11 # Visual Studio Version to use. | |
- name: Setup VSTest | |
uses: darenm/[email protected] | |
- name: Cache Nuget packages | |
uses: actions/cache@v4 | |
with: | |
path: ~/.nuget/packages | |
# Look to see if there is a cache hit for the corresponding requirements file | |
key: ${{ runner.os }}-nuget-${{ secrets.CACHE_VERSION }}-${{ hashFiles('**/packages.lock.json') }} | |
restore-keys: ${{ runner.os }}-nuget-${{ secrets.CACHE_VERSION }} | |
- name: Install dependencies | |
run: dotnet restore src/WebEid.Security.sln | |
- name: Build | |
run: msbuild src/WebEid.Security.sln /t:Build /p:Configuration=Release | |
- name: Test | |
run: vstest.console.exe src/WebEid.Security.Tests/bin/Release/net8.0/WebEID.Security.Tests.dll |