diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 74520d4..c1131f3 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -33,6 +33,9 @@ jobs: - name: Restore dependencies run: dotnet restore + - name: Install dotCover + run: dotnet tool install --global JetBrains.dotCover.GlobalTool + - name: Build run: dotnet build --no-restore --configuration Release @@ -44,3 +47,12 @@ jobs: - name: Test .NET 8 run: dotnet test --no-build --verbosity normal --configuration Release --framework net8.0 + + - name: Collect coverage + run: dotnet dotcover test --dcReportType=XML + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v4.0.0 + with: + token: ${{ secrets.CODECOV_TOKEN }} + slug: oliverbooth/X10D diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml deleted file mode 100644 index f9c2eea..0000000 --- a/.github/workflows/sonarcloud.yml +++ /dev/null @@ -1,61 +0,0 @@ -name: SonarCloud -on: - push: - branches: - - main - workflow_dispatch: - pull_request: - types: [ opened, synchronize, reopened ] - -jobs: - sonarcloud: - name: SonarCloud Analysis - runs-on: windows-latest - steps: - - name: Set up JDK 17 - uses: actions/setup-java@v3 - with: - java-version: 17 - distribution: 'zulu' - - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - 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: Install dotCover - shell: powershell - run: | - dotnet tool install --global JetBrains.dotCover.GlobalTool - - - 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.token="${{ secrets.SONAR_TOKEN }}" diff --git a/LICENSE.md b/LICENSE.md index 62ddbca..55b7f9b 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2019-2023 Oliver Booth +Copyright (c) 2019-2024 Oliver Booth Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 30b3e51..7d57465 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@
- + diff --git a/X10D.sln b/X10D.sln index 1596572..5a5696e 100644 --- a/X10D.sln +++ b/X10D.sln @@ -33,7 +33,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 EndProjectSection EndProject