diff --git a/.github/workflows/coverity-analysis.yml b/.github/workflows/coverity-analysis.yml index 36c733a..442e5d0 100644 --- a/.github/workflows/coverity-analysis.yml +++ b/.github/workflows/coverity-analysis.yml @@ -21,12 +21,12 @@ jobs: - uses: actions/checkout@v3 - name: Setup dotnet - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v3 with: dotnet-version: 6.0.x # SDK Version to use. - name: Cache Nuget packages - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.nuget/packages # Look to see if there is a cache hit for the corresponding requirements file diff --git a/.github/workflows/dotnet-build-linux.yml b/.github/workflows/dotnet-build-linux.yml index a97f6c9..f447758 100644 --- a/.github/workflows/dotnet-build-linux.yml +++ b/.github/workflows/dotnet-build-linux.yml @@ -7,24 +7,24 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - + - uses: actions/checkout@v3 + - name: Setup dotnet - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v3 with: dotnet-version: 6.0.x # SDK Version to use. - - - name: Cache Nuget packages - uses: actions/cache@v2 + + - name: Cache Nuget packages + uses: actions/cache@v3 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 diff --git a/.github/workflows/dotnet-build-windows.yml b/.github/workflows/dotnet-build-windows.yml index 44ad183..e2ec0d8 100644 --- a/.github/workflows/dotnet-build-windows.yml +++ b/.github/workflows/dotnet-build-windows.yml @@ -7,32 +7,32 @@ jobs: runs-on: windows-latest steps: - - uses: actions/checkout@v2 - + - uses: actions/checkout@v3 + - name: Setup dotnet - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v3 with: dotnet-version: 6.0.x # SDK Version to use. - + - name: Setup MSBuild - uses: microsoft/setup-msbuild@v1.0.2 + uses: microsoft/setup-msbuild@v1.1 with: vs-version: 17.1 # Visual Studio Version to use. - name: Setup VSTest - uses: darenm/Setup-VSTest@v1 + uses: darenm/Setup-VSTest@v1.2 - - name: Cache Nuget packages - uses: actions/cache@v2 + - name: Cache Nuget packages + uses: actions/cache@v3 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 diff --git a/.github/workflows/sonarcloud-analysis.yml b/.github/workflows/sonarcloud-analysis.yml index 932da36..40cd049 100644 --- a/.github/workflows/sonarcloud-analysis.yml +++ b/.github/workflows/sonarcloud-analysis.yml @@ -5,25 +5,27 @@ on: [push, pull_request] jobs: analyze: name: Analyze + if: github.repository == 'web-eid/web-eid-authtoken-validation-dotnet' runs-on: windows-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - + - name: Setup dotnet - uses: actions/setup-dotnet@v1 + uses: actions/setup-dotnet@v3 with: dotnet-version: 6.0.x # SDK Version to use. - name: Set up JDK 11 - uses: actions/setup-java@v1 + uses: actions/setup-java@v3 with: + distribution: zulu java-version: 11 - - name: Cache Nuget packages - uses: actions/cache@v2 + - name: Cache Nuget packages + uses: actions/cache@v3 with: path: ~/.nuget/packages # Look to see if there is a cache hit for the corresponding requirements file @@ -34,7 +36,7 @@ jobs: run: dotnet restore src/WebEid.Security.sln - name: Cache SonarCloud packages - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: ~/.sonar/cache key: ${{ runner.os }}-sonar @@ -42,7 +44,7 @@ jobs: - name: Cache SonarCloud scanner id: cache-sonar-scanner - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: .\.sonar\scanner key: ${{ runner.os }}-sonar-scanner @@ -62,9 +64,6 @@ jobs: shell: powershell run: | .\.sonar\scanner\dotnet-sonarscanner begin /k:"web-eid_web-eid-authtoken-validation-dotnet" /o:"web-eid" /d:sonar.cs.opencover.reportsPaths="**/TestResults/**/coverage.opencover.xml" -d:sonar.cs.vstest.reportsPaths="**/TestResults/*.trx" /d:sonar.verbose=true /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" - dotnet build --configuration Release --no-restore src/WebEid.Security.sln - dotnet test src/WebEid.Security.sln --logger trx --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover --results-directory "TestResults" - .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"