From fa4cbc1f9b0648213dd33f834a7db0daf0926422 Mon Sep 17 00:00:00 2001 From: Shargon Date: Fri, 23 Feb 2024 01:24:51 -0800 Subject: [PATCH 01/11] Fix coverage --- .github/workflows/main.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f79f8f352..243f1b706 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -67,9 +67,11 @@ jobs: -p:Exclude=\"[Neo.Compiler.CSharp.UnitTests]*\" \ -p:CoverletOutputFormat=lcov - name: Coveralls - uses: coverallsapp/github-action@master + uses: coverallsapp/github-action@v2.2.3 with: github-token: ${{ secrets.GITHUB_TOKEN }} + format: lcov + file: ${GITHUB_WORKSPACE}/coverage/lcov.info PublishPackage: if: github.ref == 'refs/heads/master' && startsWith(github.repository, 'neo-project/') From c3e109e3da38ba6cc276b631660e52b24682824c Mon Sep 17 00:00:00 2001 From: Shargon Date: Fri, 23 Feb 2024 01:28:06 -0800 Subject: [PATCH 02/11] Update main.yml --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 243f1b706..1d568b598 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -45,17 +45,17 @@ jobs: dotnet test ./tests/Neo.Compiler.CSharp.UnitTests \ --no-build \ -p:CollectCoverage=true \ - -p:CoverletOutput=${GITHUB_WORKSPACE}/coverage/ + -p:CoverletOutput=${GITHUB_WORKSPACE}/coverage/ \ + -p:Exclude=\"[Neo.Compiler.CSharp.UnitTests]*\" - name: Test Neo.SmartContract.Framework.UnitTests run: | dotnet test ./tests/Neo.SmartContract.Framework.UnitTests \ --no-build \ -l "console;verbosity=normal" \ -p:CollectCoverage=true \ - -p:CoverletOutput=${GITHUB_WORKSPACE}/coverage/lcov \ + -p:CoverletOutput=${GITHUB_WORKSPACE}/coverage/ \ -p:MergeWith=${GITHUB_WORKSPACE}/coverage/coverage.json \ - -p:Exclude=\"[Neo.Compiler.CSharp.UnitTests]*\" \ - -p:CoverletOutputFormat=lcov + -p:Exclude=\"[Neo.Compiler.CSharp.UnitTests]*\" - name: Test Neo.SmartContract.Template.UnitTests run: | dotnet test ./tests/Neo.SmartContract.Template.UnitTests \ From e27b663056e65901a805b320be63c1c40cb084d6 Mon Sep 17 00:00:00 2001 From: Shargon Date: Fri, 23 Feb 2024 01:29:14 -0800 Subject: [PATCH 03/11] Update main.yml --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1d568b598..053a5f869 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -45,7 +45,7 @@ jobs: dotnet test ./tests/Neo.Compiler.CSharp.UnitTests \ --no-build \ -p:CollectCoverage=true \ - -p:CoverletOutput=${GITHUB_WORKSPACE}/coverage/ \ + -p:CoverletOutput=${GITHUB_WORKSPACE}/coverage-join/ \ -p:Exclude=\"[Neo.Compiler.CSharp.UnitTests]*\" - name: Test Neo.SmartContract.Framework.UnitTests run: | @@ -53,8 +53,8 @@ jobs: --no-build \ -l "console;verbosity=normal" \ -p:CollectCoverage=true \ - -p:CoverletOutput=${GITHUB_WORKSPACE}/coverage/ \ - -p:MergeWith=${GITHUB_WORKSPACE}/coverage/coverage.json \ + -p:CoverletOutput=${GITHUB_WORKSPACE}/coverage-join/ \ + -p:MergeWith=${GITHUB_WORKSPACE}/coverage-join/coverage.json \ -p:Exclude=\"[Neo.Compiler.CSharp.UnitTests]*\" - name: Test Neo.SmartContract.Template.UnitTests run: | @@ -63,7 +63,7 @@ jobs: -l "console;verbosity=detailed" \ -p:CollectCoverage=true \ -p:CoverletOutput=${GITHUB_WORKSPACE}/coverage/lcov \ - -p:MergeWith=${GITHUB_WORKSPACE}/coverage/coverage.json \ + -p:MergeWith=${GITHUB_WORKSPACE}/coverage-join/coverage.json \ -p:Exclude=\"[Neo.Compiler.CSharp.UnitTests]*\" \ -p:CoverletOutputFormat=lcov - name: Coveralls From a756da20b3e53b5f7e07e1c4dc60047d6667a9b3 Mon Sep 17 00:00:00 2001 From: Shargon Date: Fri, 23 Feb 2024 01:41:18 -0800 Subject: [PATCH 04/11] Update main.yml --- .github/workflows/main.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 053a5f869..161c4ebcf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -46,6 +46,7 @@ jobs: --no-build \ -p:CollectCoverage=true \ -p:CoverletOutput=${GITHUB_WORKSPACE}/coverage-join/ \ + -p:ExcludeByFile=\"*/neo/*,**/home/runner/*\" \ -p:Exclude=\"[Neo.Compiler.CSharp.UnitTests]*\" - name: Test Neo.SmartContract.Framework.UnitTests run: | @@ -55,6 +56,7 @@ jobs: -p:CollectCoverage=true \ -p:CoverletOutput=${GITHUB_WORKSPACE}/coverage-join/ \ -p:MergeWith=${GITHUB_WORKSPACE}/coverage-join/coverage.json \ + -p:ExcludeByFile=\"*/neo/*,**/home/runner/*\" \ -p:Exclude=\"[Neo.Compiler.CSharp.UnitTests]*\" - name: Test Neo.SmartContract.Template.UnitTests run: | @@ -64,6 +66,7 @@ jobs: -p:CollectCoverage=true \ -p:CoverletOutput=${GITHUB_WORKSPACE}/coverage/lcov \ -p:MergeWith=${GITHUB_WORKSPACE}/coverage-join/coverage.json \ + -p:ExcludeByFile=\"*/neo/*,**/home/runner/*\" \ -p:Exclude=\"[Neo.Compiler.CSharp.UnitTests]*\" \ -p:CoverletOutputFormat=lcov - name: Coveralls From 0be7b8714c8086716f5749d996e9b85bb4da612b Mon Sep 17 00:00:00 2001 From: Shargon Date: Fri, 23 Feb 2024 01:44:14 -0800 Subject: [PATCH 05/11] Update main.yml --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 161c4ebcf..997c3beae 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -47,7 +47,7 @@ jobs: -p:CollectCoverage=true \ -p:CoverletOutput=${GITHUB_WORKSPACE}/coverage-join/ \ -p:ExcludeByFile=\"*/neo/*,**/home/runner/*\" \ - -p:Exclude=\"[Neo.Compiler.CSharp.UnitTests]*\" + -p:Exclude=\"[Neo.SmartContract.TestEngine]*\" - name: Test Neo.SmartContract.Framework.UnitTests run: | dotnet test ./tests/Neo.SmartContract.Framework.UnitTests \ @@ -57,7 +57,7 @@ jobs: -p:CoverletOutput=${GITHUB_WORKSPACE}/coverage-join/ \ -p:MergeWith=${GITHUB_WORKSPACE}/coverage-join/coverage.json \ -p:ExcludeByFile=\"*/neo/*,**/home/runner/*\" \ - -p:Exclude=\"[Neo.Compiler.CSharp.UnitTests]*\" + -p:Exclude=\"[Neo.SmartContract.TestEngine]*\" - name: Test Neo.SmartContract.Template.UnitTests run: | dotnet test ./tests/Neo.SmartContract.Template.UnitTests \ @@ -67,7 +67,7 @@ jobs: -p:CoverletOutput=${GITHUB_WORKSPACE}/coverage/lcov \ -p:MergeWith=${GITHUB_WORKSPACE}/coverage-join/coverage.json \ -p:ExcludeByFile=\"*/neo/*,**/home/runner/*\" \ - -p:Exclude=\"[Neo.Compiler.CSharp.UnitTests]*\" \ + -p:Exclude=\"[Neo.SmartContract.TestEngine]*\" \ -p:CoverletOutputFormat=lcov - name: Coveralls uses: coverallsapp/github-action@v2.2.3 From 08defb0166375ce5c8c222343eac7878a1366b24 Mon Sep 17 00:00:00 2001 From: Shargon Date: Fri, 23 Feb 2024 01:51:34 -0800 Subject: [PATCH 06/11] Update main.yml --- .github/workflows/main.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 997c3beae..3190f62b8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -46,8 +46,8 @@ jobs: --no-build \ -p:CollectCoverage=true \ -p:CoverletOutput=${GITHUB_WORKSPACE}/coverage-join/ \ - -p:ExcludeByFile=\"*/neo/*,**/home/runner/*\" \ - -p:Exclude=\"[Neo.SmartContract.TestEngine]*\" + -p:ExcludeByFile=\"**/neo/*,**/home/runner/*\" \ + -p:Exclude=\"[Neo.SmartContract.TestEngine]*,[Neo.Compiler.CSharp.UnitTests]*\" - name: Test Neo.SmartContract.Framework.UnitTests run: | dotnet test ./tests/Neo.SmartContract.Framework.UnitTests \ @@ -56,8 +56,8 @@ jobs: -p:CollectCoverage=true \ -p:CoverletOutput=${GITHUB_WORKSPACE}/coverage-join/ \ -p:MergeWith=${GITHUB_WORKSPACE}/coverage-join/coverage.json \ - -p:ExcludeByFile=\"*/neo/*,**/home/runner/*\" \ - -p:Exclude=\"[Neo.SmartContract.TestEngine]*\" + -p:ExcludeByFile=\"**/neo/*,**/home/runner/*\" \ + -p:Exclude=\"[Neo.SmartContract.TestEngine]*,[Neo.Compiler.CSharp.UnitTests]*\" - name: Test Neo.SmartContract.Template.UnitTests run: | dotnet test ./tests/Neo.SmartContract.Template.UnitTests \ @@ -66,8 +66,8 @@ jobs: -p:CollectCoverage=true \ -p:CoverletOutput=${GITHUB_WORKSPACE}/coverage/lcov \ -p:MergeWith=${GITHUB_WORKSPACE}/coverage-join/coverage.json \ - -p:ExcludeByFile=\"*/neo/*,**/home/runner/*\" \ - -p:Exclude=\"[Neo.SmartContract.TestEngine]*\" \ + -p:ExcludeByFile=\"**/neo/*,**/home/runner/*\" \ + -p:Exclude=\"[Neo.SmartContract.TestEngine]*,[Neo.Compiler.CSharp.UnitTests]*\" \ -p:CoverletOutputFormat=lcov - name: Coveralls uses: coverallsapp/github-action@v2.2.3 From e66dd7be1a8c42383522d333f70a1cefe0d74ea2 Mon Sep 17 00:00:00 2001 From: Shargon Date: Fri, 23 Feb 2024 01:54:07 -0800 Subject: [PATCH 07/11] Update main.yml --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 3190f62b8..d3680e572 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -46,7 +46,7 @@ jobs: --no-build \ -p:CollectCoverage=true \ -p:CoverletOutput=${GITHUB_WORKSPACE}/coverage-join/ \ - -p:ExcludeByFile=\"**/neo/*,**/home/runner/*\" \ + -p:ExcludeByFile=\"neo/*,home/runner/*\" \ -p:Exclude=\"[Neo.SmartContract.TestEngine]*,[Neo.Compiler.CSharp.UnitTests]*\" - name: Test Neo.SmartContract.Framework.UnitTests run: | @@ -56,7 +56,7 @@ jobs: -p:CollectCoverage=true \ -p:CoverletOutput=${GITHUB_WORKSPACE}/coverage-join/ \ -p:MergeWith=${GITHUB_WORKSPACE}/coverage-join/coverage.json \ - -p:ExcludeByFile=\"**/neo/*,**/home/runner/*\" \ + -p:ExcludeByFile=\"neo/*,home/runner/*\" \ -p:Exclude=\"[Neo.SmartContract.TestEngine]*,[Neo.Compiler.CSharp.UnitTests]*\" - name: Test Neo.SmartContract.Template.UnitTests run: | @@ -66,7 +66,7 @@ jobs: -p:CollectCoverage=true \ -p:CoverletOutput=${GITHUB_WORKSPACE}/coverage/lcov \ -p:MergeWith=${GITHUB_WORKSPACE}/coverage-join/coverage.json \ - -p:ExcludeByFile=\"**/neo/*,**/home/runner/*\" \ + -p:ExcludeByFile=\"neo/*,home/runner/*\" \ -p:Exclude=\"[Neo.SmartContract.TestEngine]*,[Neo.Compiler.CSharp.UnitTests]*\" \ -p:CoverletOutputFormat=lcov - name: Coveralls From e0e96ff1cb17baf6aea05aa260283b81944923d9 Mon Sep 17 00:00:00 2001 From: Shargon Date: Fri, 23 Feb 2024 01:56:33 -0800 Subject: [PATCH 08/11] Update main.yml --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d3680e572..affffe949 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -46,7 +46,7 @@ jobs: --no-build \ -p:CollectCoverage=true \ -p:CoverletOutput=${GITHUB_WORKSPACE}/coverage-join/ \ - -p:ExcludeByFile=\"neo/*,home/runner/*\" \ + -p:ExcludeByFile=\"neo/*\" \ -p:Exclude=\"[Neo.SmartContract.TestEngine]*,[Neo.Compiler.CSharp.UnitTests]*\" - name: Test Neo.SmartContract.Framework.UnitTests run: | @@ -56,7 +56,7 @@ jobs: -p:CollectCoverage=true \ -p:CoverletOutput=${GITHUB_WORKSPACE}/coverage-join/ \ -p:MergeWith=${GITHUB_WORKSPACE}/coverage-join/coverage.json \ - -p:ExcludeByFile=\"neo/*,home/runner/*\" \ + -p:ExcludeByFile=\"neo/*\" \ -p:Exclude=\"[Neo.SmartContract.TestEngine]*,[Neo.Compiler.CSharp.UnitTests]*\" - name: Test Neo.SmartContract.Template.UnitTests run: | @@ -66,7 +66,7 @@ jobs: -p:CollectCoverage=true \ -p:CoverletOutput=${GITHUB_WORKSPACE}/coverage/lcov \ -p:MergeWith=${GITHUB_WORKSPACE}/coverage-join/coverage.json \ - -p:ExcludeByFile=\"neo/*,home/runner/*\" \ + -p:ExcludeByFile=\"neo/*\" \ -p:Exclude=\"[Neo.SmartContract.TestEngine]*,[Neo.Compiler.CSharp.UnitTests]*\" \ -p:CoverletOutputFormat=lcov - name: Coveralls From bee031037acbaa45a83429e351999dac20c1c9be Mon Sep 17 00:00:00 2001 From: Shargon Date: Fri, 23 Feb 2024 01:59:49 -0800 Subject: [PATCH 09/11] Update main.yml --- .github/workflows/main.yml | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index affffe949..73126d185 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -46,8 +46,7 @@ jobs: --no-build \ -p:CollectCoverage=true \ -p:CoverletOutput=${GITHUB_WORKSPACE}/coverage-join/ \ - -p:ExcludeByFile=\"neo/*\" \ - -p:Exclude=\"[Neo.SmartContract.TestEngine]*,[Neo.Compiler.CSharp.UnitTests]*\" + -p:Exclude=\"[Neo.SmartContract.TestEngine]*,[Neo.Compiler.CSharp.UnitTests]*,[Neo]*,[Neo.IO]*,[Neo.Json]*,[Neo.VM],[Neo.Extensions]*,[Neo.Cryptography.BLS12_381]*\" - name: Test Neo.SmartContract.Framework.UnitTests run: | dotnet test ./tests/Neo.SmartContract.Framework.UnitTests \ @@ -56,8 +55,7 @@ jobs: -p:CollectCoverage=true \ -p:CoverletOutput=${GITHUB_WORKSPACE}/coverage-join/ \ -p:MergeWith=${GITHUB_WORKSPACE}/coverage-join/coverage.json \ - -p:ExcludeByFile=\"neo/*\" \ - -p:Exclude=\"[Neo.SmartContract.TestEngine]*,[Neo.Compiler.CSharp.UnitTests]*\" + -p:Exclude=\"[Neo.SmartContract.TestEngine]*,[Neo.Compiler.CSharp.UnitTests]*,[Neo]*,[Neo.IO]*,[Neo.Json]*,[Neo.VM],[Neo.Extensions]*,[Neo.Cryptography.BLS12_381]*\" - name: Test Neo.SmartContract.Template.UnitTests run: | dotnet test ./tests/Neo.SmartContract.Template.UnitTests \ @@ -66,8 +64,7 @@ jobs: -p:CollectCoverage=true \ -p:CoverletOutput=${GITHUB_WORKSPACE}/coverage/lcov \ -p:MergeWith=${GITHUB_WORKSPACE}/coverage-join/coverage.json \ - -p:ExcludeByFile=\"neo/*\" \ - -p:Exclude=\"[Neo.SmartContract.TestEngine]*,[Neo.Compiler.CSharp.UnitTests]*\" \ + -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 From 056a587c945989590c29f4f6f0a4a5753cfea2c3 Mon Sep 17 00:00:00 2001 From: Shargon Date: Fri, 23 Feb 2024 02:00:30 -0800 Subject: [PATCH 10/11] Update main.yml --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 73126d185..2b61d0ff5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -46,7 +46,7 @@ jobs: --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]*\" + -p:Exclude=\"[Neo.SmartContract.TestEngine]*,[Neo.Compiler.CSharp.UnitTests]*,[Neo]*,[Neo.IO]*,[Neo.Json]*,[Neo.VM]*,[Neo.Extensions]*,[Neo.Cryptography.BLS12_381]*\" - name: Test Neo.SmartContract.Framework.UnitTests run: | dotnet test ./tests/Neo.SmartContract.Framework.UnitTests \ @@ -55,7 +55,7 @@ jobs: -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]*\" + -p:Exclude=\"[Neo.SmartContract.TestEngine]*,[Neo.Compiler.CSharp.UnitTests]*,[Neo]*,[Neo.IO]*,[Neo.Json]*,[Neo.VM]*,[Neo.Extensions]*,[Neo.Cryptography.BLS12_381]*\" - name: Test Neo.SmartContract.Template.UnitTests run: | dotnet test ./tests/Neo.SmartContract.Template.UnitTests \ @@ -64,7 +64,7 @@ jobs: -p:CollectCoverage=true \ -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: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 From c9042a4b28eac139b9787814dc5a6e51c46d7174 Mon Sep 17 00:00:00 2001 From: Shargon Date: Fri, 23 Feb 2024 02:02:50 -0800 Subject: [PATCH 11/11] Move check format first --- .github/workflows/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2b61d0ff5..10da41fa0 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,6 +22,9 @@ jobs: uses: actions/setup-dotnet@v4 with: dotnet-version: ${{ env.DOTNET_VERSION }} + - name: Check format + run: | + dotnet format --no-restore --verify-no-changes --verbosity diagnostic - name: Build Neo.Compiler.CSharp run: dotnet build ./src/Neo.Compiler.CSharp/Neo.Compiler.CSharp.csproj - name: Build Neo.SmartContract.Template and generate artifacts @@ -35,9 +38,6 @@ jobs: dotnet ./src/Neo.Compiler.CSharp/bin/Debug/net7.0/nccs.dll ./src/Neo.SmartContract.Template/bin/Debug/Nep17Contract.csproj -o ./tests/Neo.SmartContract.Template.UnitTests/templates/neocontractnep17/Artifacts/ --generate-artifacts source --debug - name: Build Solution run: dotnet build ./neo-devpack-dotnet.sln - - name: Check format - run: | - dotnet format --no-restore --verify-no-changes --verbosity diagnostic - name: Add package coverlet.msbuild run: find tests -name *.csproj | xargs -I % dotnet add % package coverlet.msbuild - name: Test Neo.Compiler.CSharp.UnitTests