Skip to content

Bump NUnit.Analyzers from 4.1.0 to 4.3.0 in /GitHubAction #247

Bump NUnit.Analyzers from 4.1.0 to 4.3.0 in /GitHubAction

Bump NUnit.Analyzers from 4.1.0 to 4.3.0 in /GitHubAction #247

Workflow file for this run

name: .NET
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'zulu'
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Set Git Security
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 6.0.x
- name: Restore dependencies
working-directory: ./GitHubAction
run: dotnet restore ./GitHubAction.sln
- name: Build
working-directory: ./GitHubAction
run: dotnet build --no-restore
- name: Test
working-directory: ./GitHubAction
run: dotnet test --no-build --verbosity normal --logger "trx;logfilename=unitTestResults.trx" --collect "XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=cobertura,opencover
- name: Install SonarCloud scanner
run: dotnet tool install dotnet-sonarscanner --global
- name: Analyze On SonarCloud
working-directory: ./GitHubAction
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
dotnet sonarscanner begin /k:"SkylineCommunications_Skyline-DataMiner-Deploy-Action" /o:"skylinecommunications" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.opencover.reportsPaths="**/TestResults/**/coverage.opencover.xml" /d:sonar.cs.vstest.reportsPaths="**/TestResults/**.trx"
dotnet build "./GitHubAction.sln" --configuration Release -nodeReuse:false
dotnet sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"