shuffle streetcodes #1044
This file contains 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: SonarCloud | |
on: | |
push: | |
branches: | |
- master | |
- develop | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
sonarcloud_branch: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v2 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
overwrite-settings: false | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 7.0.x | |
- name: Install dotnet-coverage | |
run: dotnet tool install --global dotnet-coverage | |
- name: Install dotnet-sonarscanner | |
run: dotnet tool install --global dotnet-sonarscanner | |
- name: Install gitversion | |
run: dotnet tool install --global GitVersion.Tool --version 5.12.0 | |
- name: Restore and Build | |
run: ./Streetcode/build.sh Run | |
- name: Setup Environment For Integration Tests | |
run: ./Streetcode/build.sh SetupIntegrationTestsEnvironment | |
- name: Unit Tests | |
run: dotnet test ./Streetcode/Streetcode.XUnitTest/Streetcode.XUnitTest.csproj --configuration Release | |
- name: Integration Tests | |
run: dotnet test ./Streetcode/Streetcode.XIntegrationTest/Streetcode.XIntegrationTest.csproj --configuration Release | |
- name: SonarScanner Analysis | |
id: sonar | |
run: | | |
dotnet sonarscanner begin /k:"ita-social-projects_StreetCode" /o:"ita-social-projects" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.vscoveragexml.reportsPaths="**/coverage.xml" | |
dotnet build ./Streetcode/Streetcode.sln --configuration Release | |
dotnet-coverage collect "dotnet test ./Streetcode/Streetcode.sln --configuration Release" -f xml -o "coverage.xml" | |
dotnet sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}" |