Skip to content

Updated GitHub Actions to latest versions & allowing SonarCloud analysis to run on external pull requests #204

Updated GitHub Actions to latest versions & allowing SonarCloud analysis to run on external pull requests

Updated GitHub Actions to latest versions & allowing SonarCloud analysis to run on external pull requests #204

name: Dotnet Linux build
on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-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: 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: dotnet build --configuration Release --no-restore src/WebEid.Security.sln
- name: Test
run: dotnet test --no-restore --verbosity normal src/WebEid.Security.sln