diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index 3dae25a1df..dca46dbbd6 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -7,12 +7,30 @@ on:
env:
DOTNET_VERSION: 8.0.x
- COVERALL_COLLECT_OUTPUT: "/p:CollectCoverage=true /p:CoverletOutput='${{ github.workspace }}/TestResults/coverage/'"
- COVERALL_MERGE_PATH: "/p:MergeWith='${{ github.workspace }}/TestResults/coverage/coverage.json'"
jobs:
+ Format:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+
+ - name: Setup .NET
+ uses: actions/setup-dotnet@v4
+ with:
+ dotnet-version: ${{ env.DOTNET_VERSION }}
+
+ - name: Check Format (*.cs)
+ run: dotnet format --verify-no-changes --verbosity diagnostic
+
+ - name: Build (Neo.CLI)
+ run: |
+ dotnet build ./src/Neo.CLI \
+ --output ./out/Neo.CLI
+
Test:
+ needs: [Format]
timeout-minutes: 15
strategy:
matrix:
@@ -25,14 +43,6 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- - name: Check format
- if: matrix.os == 'ubuntu-latest'
- run: |
- dotnet format --verify-no-changes --verbosity diagnostic
- - name: Build CLI
- if: matrix.os == 'ubuntu-latest'
- run: |
- dotnet publish ./src/Neo.CLI
- name: Test
if: matrix.os != 'ubuntu-latest'
run: |
@@ -42,31 +52,40 @@ jobs:
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get --assume-yes install libleveldb-dev librocksdb-dev
-
- dotnet test ./tests/Neo.Cryptography.BLS12_381.Tests ${{ env.COVERALL_COLLECT_OUTPUT }}
- dotnet test ./tests/Neo.ConsoleService.Tests ${{ env.COVERALL_COLLECT_OUTPUT }} ${{ env.COVERALL_MERGE_PATH }}
- dotnet test ./tests/Neo.UnitTests ${{ env.COVERALL_COLLECT_OUTPUT }} ${{ env.COVERALL_MERGE_PATH }}
- dotnet test ./tests/Neo.VM.Tests ${{ env.COVERALL_COLLECT_OUTPUT }} ${{ env.COVERALL_MERGE_PATH }}
- dotnet test ./tests/Neo.Json.UnitTests ${{ env.COVERALL_COLLECT_OUTPUT }} ${{ env.COVERALL_MERGE_PATH }}
+
+ dotnet test ./tests/Neo.Cryptography.BLS12_381.Tests --output ./bin/tests/Neo.Cryptography.BLS12_381.Tests
+ dotnet test ./tests/Neo.ConsoleService.Tests --output ./bin/tests/Neo.ConsoleService.Tests
+ dotnet test ./tests/Neo.UnitTests --output ./bin/tests/Neo.UnitTests
+ dotnet test ./tests/Neo.VM.Tests --output ./bin/tests/Neo.VM.Tests
+ dotnet test ./tests/Neo.Json.UnitTests --output ./bin/tests/Neo.Json.UnitTests
# Plugins
- dotnet test ./tests/Neo.Cryptography.MPTTrie.Tests ${{ env.COVERALL_COLLECT_OUTPUT }} ${{ env.COVERALL_MERGE_PATH }}
- dotnet test ./tests/Neo.Network.RPC.Tests ${{ env.COVERALL_COLLECT_OUTPUT }} ${{ env.COVERALL_MERGE_PATH }}
- dotnet test ./tests/Neo.Plugins.OracleService.Tests ${{ env.COVERALL_COLLECT_OUTPUT }} ${{ env.COVERALL_MERGE_PATH }}
- dotnet test ./tests/Neo.Plugins.RpcServer.Tests ${{ env.COVERALL_COLLECT_OUTPUT }} ${{ env.COVERALL_MERGE_PATH }}
- dotnet test ./tests/Neo.Plugins.Storage.Tests ${{ env.COVERALL_COLLECT_OUTPUT }} ${{ env.COVERALL_MERGE_PATH }} /p:CoverletOutputFormat='cobertura'
+ dotnet test ./tests/Neo.Cryptography.MPTTrie.Tests --output ./bin/tests/Neo.Cryptography.MPTTrie.Tests
+ dotnet test ./tests/Neo.Network.RPC.Tests --output ./bin/tests/Neo.Network.RPC.Tests
+ dotnet test ./tests/Neo.Plugins.OracleService.Tests --output ./bin/tests/Neo.Plugins.OracleService.Tests
+ dotnet test ./tests/Neo.Plugins.RpcServer.Tests --output ./bin/tests/Neo.Plugins.RpcServer.Tests
+ dotnet test ./tests/Neo.Plugins.Storage.Tests --output ./bin/tests/Neo.Plugins.Storage.Tests
- name: Coveralls
if: matrix.os == 'ubuntu-latest'
uses: coverallsapp/github-action@v2.3.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- format: cobertura
- file: ${{ github.workspace }}/TestResults/coverage/coverage.cobertura.xml
+ files:
+ ${{ github.workspace }}/tests/Neo.Cryptography.BLS12_381.Tests/TestResults/coverage.info
+ ${{ github.workspace }}/tests/Neo.ConsoleService.Tests/TestResults/coverage.info
+ ${{ github.workspace }}/tests/Neo.UnitTests/TestResults/coverage.info
+ ${{ github.workspace }}/tests/Neo.VM.Tests/TestResults/coverage.info
+ ${{ github.workspace }}/tests/Neo.Json.UnitTests/TestResults/coverage.info
+ ${{ github.workspace }}/tests/Neo.Cryptography.MPTTrie.Tests/TestResults/coverage.info
+ ${{ github.workspace }}/tests/Neo.Network.RPC.Tests/TestResults/coverage.info
+ ${{ github.workspace }}/tests/Neo.Plugins.OracleService.Tests/TestResults/coverage.info
+ ${{ github.workspace }}/tests/Neo.Plugins.RpcServer.Tests/TestResults/coverage.info
+ ${{ github.workspace }}/tests/Neo.Plugins.Storage.Tests/TestResults/coverage.info
PublishPackage:
if: github.ref == 'refs/heads/master' && startsWith(github.repository, 'neo-project/')
- needs: Test
+ needs: [Test]
runs-on: ubuntu-latest
steps:
- name: Checkout
@@ -115,7 +134,7 @@ jobs:
Release:
if: github.ref == 'refs/heads/master' && startsWith(github.repository, 'neo-project/')
- needs: Test
+ needs: [Test]
runs-on: ubuntu-latest
steps:
- name: Checkout
diff --git a/src/Neo.CLI/Neo.CLI.csproj b/src/Neo.CLI/Neo.CLI.csproj
index bb52675ec4..a9d4c9919e 100644
--- a/src/Neo.CLI/Neo.CLI.csproj
+++ b/src/Neo.CLI/Neo.CLI.csproj
@@ -10,6 +10,7 @@
Neo.CLI
neo.ico
enable
+ $(SolutionDir)/bin/$(AssemblyTitle)
diff --git a/src/Neo.ConsoleService/Neo.ConsoleService.csproj b/src/Neo.ConsoleService/Neo.ConsoleService.csproj
index 206e18235e..9b3ad32dfe 100644
--- a/src/Neo.ConsoleService/Neo.ConsoleService.csproj
+++ b/src/Neo.ConsoleService/Neo.ConsoleService.csproj
@@ -4,6 +4,7 @@
netstandard2.1;net8.0
Neo.ConsoleService
enable
+ $(SolutionDir)/bin/$(PackageId)
diff --git a/src/Neo.Cryptography.BLS12_381/Neo.Cryptography.BLS12_381.csproj b/src/Neo.Cryptography.BLS12_381/Neo.Cryptography.BLS12_381.csproj
index 800699719f..d5313d9eab 100644
--- a/src/Neo.Cryptography.BLS12_381/Neo.Cryptography.BLS12_381.csproj
+++ b/src/Neo.Cryptography.BLS12_381/Neo.Cryptography.BLS12_381.csproj
@@ -5,6 +5,8 @@
netstandard2.1;net8.0
enable
enable
+ Neo.Cryptography.BLS12_381
+ $(SolutionDir)/bin/$(PackageId)
diff --git a/src/Neo.Extensions/Neo.Extensions.csproj b/src/Neo.Extensions/Neo.Extensions.csproj
index 71330a05a3..c6d549be6a 100644
--- a/src/Neo.Extensions/Neo.Extensions.csproj
+++ b/src/Neo.Extensions/Neo.Extensions.csproj
@@ -3,7 +3,9 @@
netstandard2.1;net8.0
enable
+ Neo.Extensions
NEO;Blockchain;Extensions
+ $(SolutionDir)/bin/$(PackageId)
diff --git a/src/Neo.GUI/Neo.GUI.csproj b/src/Neo.GUI/Neo.GUI.csproj
index 6c7c20912e..014459be4c 100644
--- a/src/Neo.GUI/Neo.GUI.csproj
+++ b/src/Neo.GUI/Neo.GUI.csproj
@@ -11,6 +11,7 @@
Neo.GUI
neo.ico
false
+ $(SolutionDir)/bin/$(AssemblyTitle)
@@ -62,4 +63,4 @@
-
\ No newline at end of file
+
diff --git a/src/Neo.IO/Neo.IO.csproj b/src/Neo.IO/Neo.IO.csproj
index f920a40fd5..a1a0a9ea2e 100644
--- a/src/Neo.IO/Neo.IO.csproj
+++ b/src/Neo.IO/Neo.IO.csproj
@@ -4,7 +4,9 @@
netstandard2.1;net8.0
true
enable
+ Neo.IO
NEO;Blockchain;IO
+ $(SolutionDir)/bin/$(PackageId)
diff --git a/src/Neo.Json/Neo.Json.csproj b/src/Neo.Json/Neo.Json.csproj
index cc3ea45278..3d75276dec 100644
--- a/src/Neo.Json/Neo.Json.csproj
+++ b/src/Neo.Json/Neo.Json.csproj
@@ -4,7 +4,9 @@
netstandard2.1;net8.0
enable
enable
+ Neo.Json
NEO;JSON
+ $(SolutionDir)/bin/$(PackageId)
diff --git a/src/Neo.VM/Neo.VM.csproj b/src/Neo.VM/Neo.VM.csproj
index a9157f5bcf..9315a850df 100644
--- a/src/Neo.VM/Neo.VM.csproj
+++ b/src/Neo.VM/Neo.VM.csproj
@@ -4,6 +4,8 @@
netstandard2.1;net8.0
true
enable
+ Neo.VM
+ $(SolutionDir)/bin/$(PackageId)
diff --git a/src/Neo/Neo.csproj b/src/Neo/Neo.csproj
index a10444df17..707b94fa4c 100644
--- a/src/Neo/Neo.csproj
+++ b/src/Neo/Neo.csproj
@@ -3,7 +3,9 @@
netstandard2.1;net8.0
true
+ Neo
NEO;AntShares;Blockchain;Smart Contract
+ $(SolutionDir)/bin/$(PackageId)
diff --git a/src/Plugins/ApplicationLogs/ApplicationLogs.csproj b/src/Plugins/ApplicationLogs/ApplicationLogs.csproj
index 89eea3b1bb..4529b946af 100644
--- a/src/Plugins/ApplicationLogs/ApplicationLogs.csproj
+++ b/src/Plugins/ApplicationLogs/ApplicationLogs.csproj
@@ -4,6 +4,7 @@
Neo.Plugins.ApplicationLogs
Neo.Plugins
enable
+ $(SolutionDir)/bin/$(PackageId)
@@ -18,4 +19,4 @@
PreserveNewest
-
\ No newline at end of file
+
diff --git a/src/Plugins/DBFTPlugin/DBFTPlugin.csproj b/src/Plugins/DBFTPlugin/DBFTPlugin.csproj
index b04e2e5c4f..68595be53a 100644
--- a/src/Plugins/DBFTPlugin/DBFTPlugin.csproj
+++ b/src/Plugins/DBFTPlugin/DBFTPlugin.csproj
@@ -4,6 +4,7 @@
net8.0
Neo.Consensus.DBFT
Neo.Consensus
+ $(SolutionDir)/bin/$(PackageId)
diff --git a/src/Plugins/Directory.Build.props b/src/Plugins/Directory.Build.props
index f7bcef093b..72e96f0300 100644
--- a/src/Plugins/Directory.Build.props
+++ b/src/Plugins/Directory.Build.props
@@ -9,7 +9,7 @@
-
+
diff --git a/src/Plugins/LevelDBStore/LevelDBStore.csproj b/src/Plugins/LevelDBStore/LevelDBStore.csproj
index ba82156b18..ef605a7afe 100644
--- a/src/Plugins/LevelDBStore/LevelDBStore.csproj
+++ b/src/Plugins/LevelDBStore/LevelDBStore.csproj
@@ -5,6 +5,7 @@
Neo.Plugins.Storage.LevelDBStore
Neo.Plugins.Storage
true
+ $(SolutionDir)/bin/$(PackageId)
diff --git a/src/Plugins/MPTTrie/MPTTrie.csproj b/src/Plugins/MPTTrie/MPTTrie.csproj
index a2c3377a16..ef9e45cc51 100644
--- a/src/Plugins/MPTTrie/MPTTrie.csproj
+++ b/src/Plugins/MPTTrie/MPTTrie.csproj
@@ -5,6 +5,7 @@
Neo.Cryptography.MPT
Neo.Cryptography
true
+ $(SolutionDir)/bin/$(PackageId)
diff --git a/src/Plugins/OracleService/OracleService.csproj b/src/Plugins/OracleService/OracleService.csproj
index 48ca5f3808..1fa5c5602f 100644
--- a/src/Plugins/OracleService/OracleService.csproj
+++ b/src/Plugins/OracleService/OracleService.csproj
@@ -3,6 +3,7 @@
net8.0
Neo.Plugins.OracleService
+ $(SolutionDir)/bin/$(PackageId)
@@ -23,4 +24,4 @@
-
\ No newline at end of file
+
diff --git a/src/Plugins/RocksDBStore/RocksDBStore.csproj b/src/Plugins/RocksDBStore/RocksDBStore.csproj
index 57037c68cf..441b17306e 100644
--- a/src/Plugins/RocksDBStore/RocksDBStore.csproj
+++ b/src/Plugins/RocksDBStore/RocksDBStore.csproj
@@ -4,6 +4,7 @@
net8.0
Neo.Plugins.Storage.RocksDBStore
Neo.Plugins.Storage
+ $(SolutionDir)/bin/$(PackageId)
diff --git a/src/Plugins/RpcClient/RpcClient.csproj b/src/Plugins/RpcClient/RpcClient.csproj
index cc634337d5..c43c71ef8a 100644
--- a/src/Plugins/RpcClient/RpcClient.csproj
+++ b/src/Plugins/RpcClient/RpcClient.csproj
@@ -4,6 +4,7 @@
net8.0
Neo.Network.RPC.RpcClient
Neo.Network.RPC
+ $(SolutionDir)/bin/$(PackageId)
diff --git a/src/Plugins/RpcServer/RpcServer.csproj b/src/Plugins/RpcServer/RpcServer.csproj
index 1721c6bccb..3fb7a7bb9a 100644
--- a/src/Plugins/RpcServer/RpcServer.csproj
+++ b/src/Plugins/RpcServer/RpcServer.csproj
@@ -1,8 +1,9 @@
-
+
net8.0
Neo.Plugins.RpcServer
+ $(SolutionDir)/bin/$(PackageId)
diff --git a/src/Plugins/SQLiteWallet/SQLiteWallet.csproj b/src/Plugins/SQLiteWallet/SQLiteWallet.csproj
index fb2d3e71b8..4c9029040f 100644
--- a/src/Plugins/SQLiteWallet/SQLiteWallet.csproj
+++ b/src/Plugins/SQLiteWallet/SQLiteWallet.csproj
@@ -5,6 +5,7 @@
Neo.Wallets.SQLite
Neo.Wallets.SQLite
enable
+ $(SolutionDir)/bin/$(PackageId)
diff --git a/src/Plugins/StateService/StateService.csproj b/src/Plugins/StateService/StateService.csproj
index b8e395c990..2bf85f1465 100644
--- a/src/Plugins/StateService/StateService.csproj
+++ b/src/Plugins/StateService/StateService.csproj
@@ -4,6 +4,7 @@
net8.0
Neo.Plugins.StateService
true
+ $(SolutionDir)/bin/$(PackageId)
@@ -18,4 +19,4 @@
-
\ No newline at end of file
+
diff --git a/src/Plugins/StorageDumper/StorageDumper.csproj b/src/Plugins/StorageDumper/StorageDumper.csproj
index 49d5362538..7805140f3e 100644
--- a/src/Plugins/StorageDumper/StorageDumper.csproj
+++ b/src/Plugins/StorageDumper/StorageDumper.csproj
@@ -5,6 +5,7 @@
Neo.Plugins.StorageDumper
enable
enable
+ $(SolutionDir)/bin/$(PackageId)
diff --git a/src/Plugins/TokensTracker/TokensTracker.csproj b/src/Plugins/TokensTracker/TokensTracker.csproj
index 7c3df5c0c6..bdacd3839c 100644
--- a/src/Plugins/TokensTracker/TokensTracker.csproj
+++ b/src/Plugins/TokensTracker/TokensTracker.csproj
@@ -1,8 +1,9 @@
-
+
net8.0
Neo.Plugins.TokensTracker
+ $(SolutionDir)/bin/$(PackageId)
@@ -15,4 +16,4 @@
-
\ No newline at end of file
+
diff --git a/tests/Directory.Build.props b/tests/Directory.Build.props
index 7ba3905160..a2fc251365 100644
--- a/tests/Directory.Build.props
+++ b/tests/Directory.Build.props
@@ -7,6 +7,9 @@
false
true
0
+ true
+ TestResults/
+ lcov