From e4d6d67fe625fd7a1213d66720100f4015d596ab Mon Sep 17 00:00:00 2001 From: Stanislav Vysotskyi <66203238+ArdenHide@users.noreply.github.com> Date: Tue, 4 Jun 2024 16:35:15 +0300 Subject: [PATCH] Create coverage-report.yml (#241) * Create coverage-report.yml * Update coverage-report.yml * Update coverage-report.yml * Update coverage-report.yml * Update coverage-report.yml * Update coverage-report.yml * Update coverage-report.yml * Update coverage-report.yml * Update coverage-report.yml * try print report * try to print coverage * Update coverage-report.yml * Update coverage-report.yml * Update coverage-report.yml * Update coverage-report.yml * Update coverage-report.yml * Update coverage-report.yml * use MarkdownSummary * Update coverage-report.yml * Update coverage-report.yml * use MarkdownSummaryGithub * fix for SummaryGithub.md * Update coverage-report.yml * Update coverage-report.yml * Update coverage-report.yml * Update coverage-report.yml * Update coverage-report.yml * Delete .github/workflows/sonarcloud.yml --------- Co-authored-by: Stan Goldin <48094744+Lomet@users.noreply.github.com> --- .github/workflows/coverage-report.yml | 12 +++++ .github/workflows/sonarcloud.yml | 63 --------------------------- 2 files changed, 12 insertions(+), 63 deletions(-) create mode 100644 .github/workflows/coverage-report.yml delete mode 100644 .github/workflows/sonarcloud.yml diff --git a/.github/workflows/coverage-report.yml b/.github/workflows/coverage-report.yml new file mode 100644 index 00000000..dac9cba4 --- /dev/null +++ b/.github/workflows/coverage-report.yml @@ -0,0 +1,12 @@ +name: Build with Markdown Report + +on: + push: + branches: + - master + pull_request: + types: [opened, synchronize, reopened] + +jobs: + build-and-test: + uses: The-Poolz/.net-workflows/.github/workflows/coverage-report.yml@master diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml deleted file mode 100644 index dfb74f50..00000000 --- a/.github/workflows/sonarcloud.yml +++ /dev/null @@ -1,63 +0,0 @@ -name: SonarCloud -on: - push: - branches: - - master - pull_request: - types: [opened, synchronize, reopened] -jobs: - build: - name: Build and analyze - runs-on: windows-latest - steps: - - name: Set up JDK 17 - uses: actions/setup-java@v3 - with: - java-version: 17 - distribution: 'zulu' - - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Setup .NET - uses: actions/setup-dotnet@v3 - with: - dotnet-version: '6.0.x' - - - name: Install Coverlet tool - run: dotnet tool install --global coverlet.console - - - name: Cache SonarCloud packages - uses: actions/cache@v3 - with: - path: ~\sonar\cache - key: ${{ runner.os }}-sonar - restore-keys: ${{ runner.os }}-sonar - - - name: Cache SonarCloud scanner - id: cache-sonar-scanner - uses: actions/cache@v3 - with: - path: .\.sonar\scanner - key: ${{ runner.os }}-sonar-scanner - restore-keys: ${{ runner.os }}-sonar-scanner - - - name: Install SonarCloud scanner - if: steps.cache-sonar-scanner.outputs.cache-hit != 'true' - shell: powershell - run: | - New-Item -Path .\.sonar\scanner -ItemType Directory - dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner - - - name: Build and analyze - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - shell: powershell - run: | - .\.sonar\scanner\dotnet-sonarscanner begin /k:"The-Poolz_LockDeal-NFT-API" /o:"the-poolz" /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 test LockDeal-NFT-API.sln --logger trx --collect:"XPlat Code Coverage" -- DataCollectionRunSettings.DataCollectors.DataCollector.Configuration.Format=opencover - dotnet build LockDeal-NFT-API.sln - .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"