diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 2a502e80..d716b92f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -8,12 +8,28 @@ on:
jobs:
build:
- runs-on: windows-latest
+ strategy:
+ matrix:
+ os: [ubuntu-latest, windows-latest, macos-latest]
+ runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@main
- name: Setup .NET
uses: actions/setup-dotnet@main
with:
global-json-file: ./global.json
- - name: dotnet test
- run: dotnet test ./src/nunit.analyzers.tests/
+
+ - name: .NET6.0 Test
+ run: |
+ dotnet tool install --global dotnet-coverage
+ dotnet test --collect:"XPlat Code Coverage" -f net6.0 ./src/nunit.analyzers.tests/
+ dotnet-coverage merge -o merged.cobertura.xml -f cobertura -r coverage.cobertura.xml
+
+ - name: .NET Framework Test
+ if: runner.os == 'Windows'
+ run: |
+ dotnet test -f net462 ./src/nunit.analyzers.tests/
+
+ - name: Post Coverage
+ uses: k1LoW/octocov-action@v0
+ if: runner.os == 'Linux'
diff --git a/.octocov.yml b/.octocov.yml
new file mode 100644
index 00000000..5fb4c563
--- /dev/null
+++ b/.octocov.yml
@@ -0,0 +1,21 @@
+coverage:
+ paths:
+ - merged.covertura.xml
+
+codeToTestRatio:
+ code: # files to count as "Code"
+ - 'src/nunit.analyzers/**/*.cs'
+ test: # files to count as "Test"
+ - 'src/nunit.analyzers.tests/**/*.cs'
+
+comment:
+ if: is_pull_request
+
+report:
+ if: is_default_branch
+ datastores:
+ - artifact://${GITHUB_REPOSITORY}
+
+diff:
+ datastores:
+ - artifact://${GITHUB_REPOSITORY}
diff --git a/src/nunit.analyzers.tests/nunit.analyzers.tests.csproj b/src/nunit.analyzers.tests/nunit.analyzers.tests.csproj
index c9343736..418ae826 100644
--- a/src/nunit.analyzers.tests/nunit.analyzers.tests.csproj
+++ b/src/nunit.analyzers.tests/nunit.analyzers.tests.csproj
@@ -5,6 +5,10 @@
+
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+ all
+
@@ -17,8 +21,7 @@
-
+