diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 7d3fc24..90a86e4 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -33,6 +33,11 @@ jobs: - name: Restore dependencies run: dotnet restore + - name: Install dotCover + shell: powershell + run: | + dotnet tool install --global JetBrains.dotCover.GlobalTool + - name: Build run: dotnet build --no-restore --configuration Release @@ -44,3 +49,15 @@ jobs: - name: Test .NET 7 run: dotnet test --no-build --verbosity normal --configuration Release --framework net7.0 + + - name: Test .NET 8 + run: dotnet test --no-build --verbosity normal --configuration Release --framework net8.0 + + - name: Collect coverage + run: dotnet dotcover test --dcReportType=HTML + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4.0.1 + env: + token: ${{ secrets.CODECOV_TOKEN }} + slug: oliverbooth/X10D diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml deleted file mode 100644 index 0fade2c..0000000 --- a/.github/workflows/sonarcloud.yml +++ /dev/null @@ -1,50 +0,0 @@ -name: Build -on: - push: - branches: - - main - workflow_dispatch: - pull_request: - types: [opened, synchronize, reopened] -jobs: - build: - name: Build - runs-on: windows-latest - steps: - - name: Set up JDK 11 - uses: actions/setup-java@v1 - with: - java-version: 1.11 - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Cache SonarCloud packages - uses: actions/cache@v1 - with: - path: ~\sonar\cache - key: ${{ runner.os }}-sonar - restore-keys: ${{ runner.os }}-sonar - - name: Cache SonarCloud scanner - id: cache-sonar-scanner - uses: actions/cache@v1 - 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:"X10D" /o:"oliverbooth" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /d:sonar.cs.dotcover.reportsPaths=dotCover.Output.html - dotnet build --no-incremental - dotnet dotcover test --dcReportType=HTML - .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}" diff --git a/README.md b/README.md index a272771..aa2daca 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@

GitHub Workflow Status GitHub Issues -Coverage +Coverage NuGet Downloads Stable Version Nightly Version diff --git a/X10D.sln b/X10D.sln index dd11b7d..77e924d 100644 --- a/X10D.sln +++ b/X10D.sln @@ -36,7 +36,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Workflows", "Workflows", "{ .github\workflows\nightly.yml = .github\workflows\nightly.yml .github\workflows\prerelease.yml = .github\workflows\prerelease.yml .github\workflows\release.yml = .github\workflows\release.yml - .github\workflows\sonarcloud.yml = .github\workflows\sonarcloud.yml .github\workflows\source_validator.yml = .github\workflows\source_validator.yml .github\workflows\unity.yml = .github\workflows\unity.yml EndProjectSection