[Add] mono #905
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 & Test & SonarQube | |
| on: | |
| push: | |
| pull_request: | |
| types: [opened, synchronize, reopened] | |
| jobs: | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6.0.2 | |
| with: | |
| fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
| - name: Set up JDK 17 | |
| uses: actions/setup-java@v5.2.0 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '17' | |
| overwrite-settings: false | |
| - name: Setup dotnet | |
| uses: actions/setup-dotnet@v5.1.0 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: Install Mono (for .NET Framework tests) | |
| run: sudo apt-get update && sudo apt-get install -y mono-complete | |
| - name: install dotnet-reportgenerator-globaltool | |
| run: dotnet tool install --global dotnet-reportgenerator-globaltool | |
| - name: add DevExpress nuget feed | |
| env: | |
| DEVEXPRESS_NUGET_KEY: ${{ secrets.DEVEXPRESS_NUGET_KEY }} | |
| run: dotnet nuget add source https://nuget.devexpress.com/api -n DXFeed -u DevExpress -p $DEVEXPRESS_NUGET_KEY --store-password-in-clear-text | |
| - name: Sonarqube Begin | |
| env: | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| SONAR_SCANNER_OPTS: "-Xmx4096m" | |
| run: | | |
| dotnet tool install --global dotnet-sonarscanner | |
| dotnet tool install --global dotnet-coverage | |
| dotnet sonarscanner begin /k:"STARIONGROUP_CDP4-SDK-Community-Edition" /o:"stariongroup" /d:sonar.token="$SONAR_TOKEN" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.vscoveragexml.reportsPaths=coverage.xml | |
| - name: Install dependencies | |
| run: dotnet restore CDP4-SDK.sln | |
| - name: Build | |
| run: dotnet build CDP4-SDK.sln --no-restore /p:ContinuousIntegrationBuild=true | |
| - name: Test with the dotnet CLI | |
| run: dotnet-coverage collect "dotnet test CDP4-SDK.sln --no-restore --no-build --verbosity normal" -f xml -o "coverage.xml" | |
| - name: Sonarqube end | |
| env: | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| run: dotnet sonarscanner end /d:sonar.token="$SONAR_TOKEN" |