diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index b610a9ef7..13eb1d49d 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -7,6 +7,10 @@ on:
env:
DOTNET_VERSION: 8.0.x
+ DOTNET_TEST_PARAMETERS: --no-build /p:CollectCoverage=true -l "console;verbosity=detailed"
+ COVERLET_EXCLUDE_COVERAGE: /p:Exclude=\"[Neo.SmartContract.TestEngine]*,[Neo.Compiler.CSharp.UnitTests]*,[Neo]*,[Neo.IO]*,[Neo.Json]*,[Neo.VM]*,[Neo.Extensions]*,[Neo.Cryptography.BLS12_381]*\"
+ COVERLET_OUTPUT: /p:CoverletOutput=${{ github.workspace }}/coverage-join/
+ COVERLET_MERGE_WITH: /p:MergeWith=${{ github.workspace }}/coverage-join/coverage.json
jobs:
@@ -51,43 +55,33 @@ jobs:
- name: Test Neo.Compiler.CSharp.UnitTests
run: |
dotnet test ./tests/Neo.Compiler.CSharp.UnitTests \
- --no-build \
- /p:CollectCoverage=true \
- /p:CoverletOutput=${{ github.workspace }}/coverage-join/ \
- /p:Exclude=\"[Neo.SmartContract.TestEngine]*,[Neo.Compiler.CSharp.UnitTests]*,[Neo]*,[Neo.IO]*,[Neo.Json]*,[Neo.VM]*,[Neo.Extensions]*,[Neo.Cryptography.BLS12_381]*\"
+ ${{ env.DOTNET_TEST_PARAMETERS }} \
+ ${{ env.COVERLET_OUTPUT }} \
+ ${{ env.COVERLET_EXCLUDE_COVERAGE }} \
- name: Test Neo.SmartContract.Framework.UnitTests
run: |
dotnet test ./tests/Neo.SmartContract.Framework.UnitTests \
- --no-build \
- -e "COVERAGE_MERGE_JOIN=${{ github.workspace }}/coverage-join/coverage.json" \
- -l "console;verbosity=detailed" \
- /p:CollectCoverage=true \
- /p:CoverletOutput=${{ github.workspace }}/coverage-join/ \
- /p:MergeWith=${{ github.workspace }}/coverage-join/coverage.json \
- /p:Exclude=\"[Neo.SmartContract.TestEngine]*,[Neo.Compiler.CSharp.UnitTests]*,[Neo]*,[Neo.IO]*,[Neo.Json]*,[Neo.VM]*,[Neo.Extensions]*,[Neo.Cryptography.BLS12_381]*\"
+ ${{ env.DOTNET_TEST_PARAMETERS }} \
+ ${{ env.COVERLET_OUTPUT }} \
+ ${{ env.COVERLET_MERGE_WITH }} \
+ ${{ env.COVERLET_EXCLUDE_COVERAGE }} \
- name: Test Neo.SmartContract.Testing.UnitTests
run: |
dotnet test ./tests/Neo.SmartContract.Testing.UnitTests \
- --no-build \
- -e "COVERAGE_MERGE_JOIN=${{ github.workspace }}/coverage-join/coverage.json" \
- -l "console;verbosity=detailed" \
- /p:CollectCoverage=true \
- /p:CoverletOutput=${{ github.workspace }}/coverage-join/ \
- /p:MergeWith=${{ github.workspace }}/coverage-join/coverage.json \
- /p:Exclude=\"[Neo.SmartContract.TestEngine]*,[Neo.Compiler.CSharp.UnitTests]*,[Neo]*,[Neo.IO]*,[Neo.Json]*,[Neo.VM]*,[Neo.Extensions]*,[Neo.Cryptography.BLS12_381]*\"
+ ${{ env.DOTNET_TEST_PARAMETERS }} \
+ ${{ env.COVERLET_OUTPUT }} \
+ ${{ env.COVERLET_MERGE_WITH }} \
+ ${{ env.COVERLET_EXCLUDE_COVERAGE }} \
- name: Test Neo.SmartContract.Template.UnitTests
run: |
dotnet test ./tests/Neo.SmartContract.Template.UnitTests \
- --no-build \
- -e "COVERAGE_MERGE_JOIN=${{ github.workspace }}/coverage-join/coverage.json" \
- -l "console;verbosity=detailed" \
- /p:CollectCoverage=true \
+ ${{ env.DOTNET_TEST_PARAMETERS }} \
+ ${{ env.COVERLET_MERGE_WITH }} \
+ ${{ env.COVERLET_EXCLUDE_COVERAGE }} \
/p:CoverletOutput=${{ github.workspace }}/coverage/lcov \
- /p:MergeWith=${{ github.workspace }}/coverage-join/coverage.json \
- /p:Exclude=\"[Neo.SmartContract.TestEngine]*,[Neo.Compiler.CSharp.UnitTests]*,[Neo]*,[Neo.IO]*,[Neo.Json]*,[Neo.VM]*,[Neo.Extensions]*,[Neo.Cryptography.BLS12_381]*\" \
/p:CoverletOutputFormat=lcov
- name: Coveralls
- uses: coverallsapp/github-action@v2.2.3
+ uses: coverallsapp/github-action@v2.3.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
format: lcov
diff --git a/src/Neo.SmartContract.Analyzer/Neo.SmartContract.Analyzer.csproj b/src/Neo.SmartContract.Analyzer/Neo.SmartContract.Analyzer.csproj
index 097be8ad2..6cfc7917d 100644
--- a/src/Neo.SmartContract.Analyzer/Neo.SmartContract.Analyzer.csproj
+++ b/src/Neo.SmartContract.Analyzer/Neo.SmartContract.Analyzer.csproj
@@ -23,7 +23,7 @@
-
+
diff --git a/src/Neo.SmartContract.Testing/Neo.SmartContract.Testing.csproj b/src/Neo.SmartContract.Testing/Neo.SmartContract.Testing.csproj
index 9f2383c7f..46560e6dc 100644
--- a/src/Neo.SmartContract.Testing/Neo.SmartContract.Testing.csproj
+++ b/src/Neo.SmartContract.Testing/Neo.SmartContract.Testing.csproj
@@ -18,8 +18,8 @@
-
-
+
+
diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props
index 5f0bfb1c6..5139e570b 100644
--- a/tests/Directory.Build.props
+++ b/tests/Directory.Build.props
@@ -9,8 +9,8 @@
-
-
+
+
all
runtime; build; native; contentfiles; analyzers; buildtransitive