Repository navigation
Refactor install scripts for naming consistency #32
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
| name: Build | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| sonarcloud: | |
| name: Build, Test & Analyze | |
| runs-on: windows-latest | |
| env: | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # required for SonarCloud blame data | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '10.x' | |
| - name: Install SonarScanner | |
| if: ${{ env.SONAR_TOKEN != '' }} | |
| run: dotnet tool install --global dotnet-sonarscanner | |
| - name: Begin SonarCloud Analysis | |
| if: ${{ env.SONAR_TOKEN != '' }} | |
| run: | | |
| dotnet sonarscanner begin ` | |
| /k:"cortexiumlabs_vectractl" ` | |
| /o:"cortexiumlabs" ` | |
| /d:sonar.token="${{ secrets.SONAR_TOKEN }}" ` | |
| /d:sonar.host.url="https://sonarcloud.io" ` | |
| /d:sonar.cs.opencover.reportsPaths="coverage/**/coverage.opencover.xml" ` | |
| /d:sonar.exclusions="**/obj/**,**/bin/**,examples/**" ` | |
| /d:sonar.coverage.exclusions="examples/**" | |
| - name: Build | |
| run: dotnet build --no-incremental | |
| - name: Run Tests with Coverage | |
| run: | | |
| dotnet test ` | |
| --collect:"XPlat Code Coverage" ` | |
| --results-directory ./coverage ` | |
| -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover | |
| - name: End SonarCloud Analysis | |
| if: ${{ env.SONAR_TOKEN != '' }} | |
| run: dotnet sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}" |