From ac82200303e187f6063d2143918f761a56d6b9b9 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Mon, 12 Feb 2024 10:20:35 +0000 Subject: [PATCH 1/9] [ci skip] ci: switch to codecov for coverage --- .github/workflows/dotnet.yml | 17 +++++++++++ .github/workflows/sonarcloud.yml | 50 -------------------------------- README.md | 2 +- X10D.sln | 1 - 4 files changed, 18 insertions(+), 52 deletions(-) delete mode 100644 .github/workflows/sonarcloud.yml 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 From 1daa8ffd561995e0a3ca7d8365d6553c090d4cc9 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Mon, 12 Feb 2024 10:23:03 +0000 Subject: [PATCH 2/9] [ci skip] fix(ci): remove shell field from dotcover install step --- .github/workflows/dotnet.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 90a86e4..6b5b6cf 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -34,9 +34,7 @@ jobs: run: dotnet restore - name: Install dotCover - shell: powershell - run: | - dotnet tool install --global JetBrains.dotCover.GlobalTool + run: dotnet tool install --global JetBrains.dotCover.GlobalTool - name: Build run: dotnet build --no-restore --configuration Release From 485501cfc0179ec3f44f20c881509ca9a1c1e63f Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Mon, 12 Feb 2024 14:41:01 +0000 Subject: [PATCH 3/9] ci(test): add dotCover output to codecov upload --- .github/workflows/dotnet.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index cdc50b2..51e986c 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -55,4 +55,5 @@ jobs: uses: codecov/codecov-action@v4.0.1 env: token: ${{ secrets.CODECOV_TOKEN }} + files: dotCover.Output.xml slug: oliverbooth/X10D From a71cb73df76b41e058a417314f55922d540bcb43 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Mon, 12 Feb 2024 14:42:44 +0000 Subject: [PATCH 4/9] [ci skip] ci(test): add dotCover output to codecov upload --- .github/workflows/dotnet.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 6b5b6cf..a189f34 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -58,4 +58,5 @@ jobs: uses: codecov/codecov-action@v4.0.1 env: token: ${{ secrets.CODECOV_TOKEN }} + files: dotCover.Output.xml slug: oliverbooth/X10D From 9a506a6b294db4b9a86fab3581f18d60c527b0e2 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Mon, 12 Feb 2024 14:45:42 +0000 Subject: [PATCH 5/9] [ci skip] fix(ci): output xml from dotCover --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index a189f34..681515c 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -52,7 +52,7 @@ jobs: run: dotnet test --no-build --verbosity normal --configuration Release --framework net8.0 - name: Collect coverage - run: dotnet dotcover test --dcReportType=HTML + run: dotnet dotcover test --dcReportType=XML - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v4.0.1 From 5e60019a0d595a880c07a8ca00f5260448814f38 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Mon, 12 Feb 2024 15:09:15 +0000 Subject: [PATCH 6/9] [ci skip] ci: downgrade codecov-action to 4.0.0 --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 681515c..589a8e3 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -55,7 +55,7 @@ jobs: run: dotnet dotcover test --dcReportType=XML - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v4.0.1 + uses: codecov/codecov-action@v4.0.0 env: token: ${{ secrets.CODECOV_TOKEN }} files: dotCover.Output.xml From 22da9aa76974d63fb1757ba8e51b67a3613f31b3 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Sat, 17 Feb 2024 00:28:58 +0000 Subject: [PATCH 7/9] fix(ci): workflow should use 'with' not 'env' --- .github/workflows/dotnet.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index 589a8e3..348a2cc 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -56,7 +56,7 @@ jobs: - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v4.0.0 - env: + with: token: ${{ secrets.CODECOV_TOKEN }} files: dotCover.Output.xml slug: oliverbooth/X10D From 89de426d9a270c8b049c4c238f2595e3c829f6df Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Sat, 17 Feb 2024 03:04:19 +0000 Subject: [PATCH 8/9] ci: search for files with codecov --- .github/workflows/dotnet.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml index d8c271d..c1131f3 100644 --- a/.github/workflows/dotnet.yml +++ b/.github/workflows/dotnet.yml @@ -55,5 +55,4 @@ jobs: uses: codecov/codecov-action@v4.0.0 with: token: ${{ secrets.CODECOV_TOKEN }} - files: dotCover.Output.xml slug: oliverbooth/X10D From 4dc5fc11484226ac04de2084aa0ceacdd3e54a70 Mon Sep 17 00:00:00 2001 From: Oliver Booth Date: Sat, 17 Feb 2024 15:30:02 +0000 Subject: [PATCH 9/9] [ci skip] docs: update license year --- LICENSE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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