Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] Github Action Issues #3759

Merged
merged 28 commits into from
Feb 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
a513faa
Fix Windows workflow action
cschuchardt88 Feb 13, 2025
51ac973
Changed dotnet test command
cschuchardt88 Feb 13, 2025
709f00f
fix some stuff
cschuchardt88 Feb 13, 2025
99badd4
Merge branch 'master' into fix/workflow-crash
cschuchardt88 Feb 13, 2025
691a895
Fix
cschuchardt88 Feb 13, 2025
138e1eb
Merge branch 'fix/workflow-crash' of github.com:cschuchardt88/neo int…
cschuchardt88 Feb 13, 2025
791dd49
fix windows action
cschuchardt88 Feb 13, 2025
8106cd3
Added `OverwriteReadOnlyFiles`
cschuchardt88 Feb 13, 2025
50862b4
revert some stuff
cschuchardt88 Feb 13, 2025
171cea7
update version for coverallsapp action
cschuchardt88 Feb 13, 2025
9b46d35
fixes to tests
cschuchardt88 Feb 13, 2025
a265a89
Fixes
cschuchardt88 Feb 13, 2025
52759a5
fixed
cschuchardt88 Feb 13, 2025
74b0375
continue on error
cschuchardt88 Feb 13, 2025
e420fe1
Merge branch 'master' into fix/workflow-crash
cschuchardt88 Feb 14, 2025
bc1f937
Update .github/workflows/main.yml
cschuchardt88 Feb 14, 2025
8c768fa
merge `master` into `this`
cschuchardt88 Feb 14, 2025
c6d46bc
Merge branch 'master' into fix/workflow-crash
cschuchardt88 Feb 14, 2025
d34cf34
Merge branch 'master' into fix/workflow-crash
cschuchardt88 Feb 14, 2025
6488f31
fix
cschuchardt88 Feb 14, 2025
61eac5a
revert to do what @shargon wants
cschuchardt88 Feb 14, 2025
e914691
Upload
cschuchardt88 Feb 14, 2025
5824ed5
Update .github/workflows/main.yml
cschuchardt88 Feb 14, 2025
212a80b
Fixed readonly
cschuchardt88 Feb 14, 2025
fa96937
ci fix
cschuchardt88 Feb 14, 2025
d5aa9fc
added `--disable-parallel`
cschuchardt88 Feb 14, 2025
f5b83d9
fix `-p:Exclude="[Neo.UnitTests]*"`
cschuchardt88 Feb 14, 2025
fe95772
Merge branch 'master' into fix/workflow-crash
shargon Feb 15, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 22 additions & 32 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:

env:
DOTNET_VERSION: 9.0.x
COVERLET_EXCLUDE_COVERAGE: -p:Exclude="[Neo.UnitTests]*"

jobs:

Expand Down Expand Up @@ -39,7 +38,7 @@ jobs:
dotnet-version: ${{ env.DOTNET_VERSION }}

- name: Build (Everything)
run: dotnet build -p:GITHUB_ACTIONS=true
run: dotnet build --disable-parallel -p:GITHUB_ACTIONS=true

- name: Install dependencies
run: |
Expand Down Expand Up @@ -70,53 +69,44 @@ jobs:
run: |
brew install leveldb
brew install gperftools
dotnet build -p:GITHUB_ACTIONS=true
dotnet build --disable-parallel -p:GITHUB_ACTIONS=true
dotnet test --no-build -p:GITHUB_ACTIONS=true

- name: Test (windows)
if: matrix.os == 'windows-latest'
run: |
dotnet build -p:GITHUB_ACTIONS=true
dotnet build --disable-parallel -p:GITHUB_ACTIONS=true
dotnet test --no-build -p:GITHUB_ACTIONS=true

- name: Test for coverall
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get --assume-yes install libleveldb-dev librocksdb-dev

dotnet test ./tests/Neo.Cryptography.BLS12_381.Tests --output ./bin/tests/Neo.Cryptography.BLS12_381.Tests ${{ env.COVERLET_EXCLUDE_COVERAGE }} -p:GITHUB_ACTIONS=true
dotnet test ./tests/Neo.ConsoleService.Tests --output ./bin/tests/Neo.ConsoleService.Tests ${{ env.COVERLET_EXCLUDE_COVERAGE }} -p:GITHUB_ACTIONS=true
dotnet test ./tests/Neo.UnitTests --output ./bin/tests/Neo.UnitTests ${{ env.COVERLET_EXCLUDE_COVERAGE }} -p:GITHUB_ACTIONS=true
dotnet test ./tests/Neo.VM.Tests --output ./bin/tests/Neo.VM.Tests ${{ env.COVERLET_EXCLUDE_COVERAGE }} -p:GITHUB_ACTIONS=true
dotnet test ./tests/Neo.Json.UnitTests --output ./bin/tests/Neo.Json.UnitTests ${{ env.COVERLET_EXCLUDE_COVERAGE }} -p:GITHUB_ACTIONS=true
dotnet test ./tests/Neo.Extensions.Tests --output ./bin/tests/Neo.Extensions.Tests ${{ env.COVERLET_EXCLUDE_COVERAGE }} -p:GITHUB_ACTIONS=true

# Plugins
dotnet test ./tests/Neo.Cryptography.MPTTrie.Tests --output ./bin/tests/Neo.Cryptography.MPTTrie.Tests ${{ env.COVERLET_EXCLUDE_COVERAGE }} -p:GITHUB_ACTIONS=true
dotnet test ./tests/Neo.Network.RPC.Tests --output ./bin/tests/Neo.Network.RPC.Tests ${{ env.COVERLET_EXCLUDE_COVERAGE }} -p:GITHUB_ACTIONS=true
dotnet test ./tests/Neo.Plugins.OracleService.Tests --output ./bin/tests/Neo.Plugins.OracleService.Tests ${{ env.COVERLET_EXCLUDE_COVERAGE }} -p:GITHUB_ACTIONS=true
dotnet test ./tests/Neo.Plugins.RpcServer.Tests --output ./bin/tests/Neo.Plugins.RpcServer.Tests ${{ env.COVERLET_EXCLUDE_COVERAGE }} -p:GITHUB_ACTIONS=true
dotnet test ./tests/Neo.Plugins.Storage.Tests --output ./bin/tests/Neo.Plugins.Storage.Tests ${{ env.COVERLET_EXCLUDE_COVERAGE }} -p:GITHUB_ACTIONS=true
dotnet test ./tests/Neo.Plugins.ApplicationLogs.Tests --output ./bin/tests/Neo.Plugins.ApplicationLogs.Tests ${{ env.COVERLET_EXCLUDE_COVERAGE }} -p:GITHUB_ACTIONS=true
dotnet build --disable-parallel -p:GITHUB_ACTIONS=true
dotnet test --no-build -p:GITHUB_ACTIONS=true -p:Exclude="[Neo.UnitTests]*"

- name: Coveralls
if: matrix.os == 'ubuntu-latest'
uses: coverallsapp/[email protected].0
uses: coverallsapp/[email protected].6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
debug: false
measure: true
allow-empty: true
format: lcov
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
${{ github.workspace }}/tests/Neo.Plugins.ApplicationLogs.Tests/TestResults/coverage.info
${{ github.workspace }}/tests/Neo.Extensions.Tests/TestResults/coverage.info
${{ github.workspace }}/TestResults/Neo.UnitTests/coverage.info
${{ github.workspace }}/TestResults/Neo.Cryptography.BLS12_381.Tests/coverage.info
${{ github.workspace }}/TestResults/Neo.ConsoleService.Tests/coverage.info
${{ github.workspace }}/TestResults/Neo.VM.Tests/coverage.info
${{ github.workspace }}/TestResults/Neo.Json.UnitTests/coverage.info
${{ github.workspace }}/TestResults/Neo.Cryptography.MPTTrie.Tests/coverage.info
${{ github.workspace }}/TestResults/Neo.Network.RPC.Tests/coverage.info
${{ github.workspace }}/TestResults/Neo.Plugins.OracleService.Tests/coverage.info
${{ github.workspace }}/TestResults/Neo.Plugins.RpcServer.Tests/coverage.info
${{ github.workspace }}/TestResults/Neo.Plugins.Storage.Tests/coverage.info
${{ github.workspace }}/TestResults/Neo.Plugins.ApplicationLogs.Tests/coverage.info
${{ github.workspace }}/TestResults/Neo.Extensions.Tests/coverage.info

PublishPackage:
if: github.ref == 'refs/heads/master' && startsWith(github.repository, 'neo-project/')
Expand Down
1 change: 1 addition & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
<WarningLevel>4</WarningLevel>
<AnalysisLevel>latest</AnalysisLevel>
<OutputPath>../../bin/$(PackageId)</OutputPath>
<OverwriteReadOnlyFiles>true</OverwriteReadOnlyFiles>
</PropertyGroup>

<ItemGroup>
Expand Down
6 changes: 5 additions & 1 deletion src/Plugins/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
<Import Project="../$(MSBuildThisFile)" />

<PropertyGroup>
<OverwriteReadOnlyFiles>true</OverwriteReadOnlyFiles>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="../../Neo/Neo.csproj" />
</ItemGroup>
Expand Down
6 changes: 3 additions & 3 deletions src/Plugins/LevelDBStore/LevelDBStore.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
</PropertyGroup>

<Target Name="DownloadNativeLibs" BeforeTargets="PreBuildEvent">
<DownloadFile Condition="!Exists('runtimes/%(NativeLib.RuntimeId)/native/%(NativeLib.Lib)')" SourceUrl="https://github.com/neo-ngd/leveldb/releases/download/v1.23/libleveldb-%(NativeLib.RuntimeId).zip" DestinationFolder="$(BaseIntermediateOutputPath)" />
<Unzip Condition="Exists('$(BaseIntermediateOutputPath)libleveldb-%(NativeLib.RuntimeId).zip') And !Exists('runtimes/%(NativeLib.RuntimeId)/native/%(NativeLib.Lib)')" SourceFiles="$(BaseIntermediateOutputPath)libleveldb-%(NativeLib.RuntimeId).zip" DestinationFolder="$(BaseIntermediateOutputPath)" />
<Move SourceFiles="$(BaseIntermediateOutputPath)libleveldb-%(NativeLib.RuntimeId)/%(NativeLib.Lib)" DestinationFolder="$(BaseIntermediateOutputPath)libleveldb-%(NativeLib.RuntimeId)/runtimes/%(NativeLib.RuntimeId)/native/" />
<DownloadFile Condition="!Exists('runtimes/%(NativeLib.RuntimeId)/native/%(NativeLib.Lib)')" SourceUrl="https://github.com/neo-ngd/leveldb/releases/download/v1.23/libleveldb-%(NativeLib.RuntimeId).zip" DestinationFolder="$(BaseIntermediateOutputPath)" Retries="3" />
<Unzip Condition="Exists('$(BaseIntermediateOutputPath)libleveldb-%(NativeLib.RuntimeId).zip') And !Exists('runtimes/%(NativeLib.RuntimeId)/native/%(NativeLib.Lib)')" SourceFiles="$(BaseIntermediateOutputPath)libleveldb-%(NativeLib.RuntimeId).zip" DestinationFolder="$(BaseIntermediateOutputPath)" OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" />
<Move SourceFiles="$(BaseIntermediateOutputPath)libleveldb-%(NativeLib.RuntimeId)/%(NativeLib.Lib)" DestinationFolder="$(BaseIntermediateOutputPath)libleveldb-%(NativeLib.RuntimeId)/runtimes/%(NativeLib.RuntimeId)/native/" OverwriteReadOnlyFiles="$(OverwriteReadOnlyFiles)" />
</Target>

<ItemGroup>
Expand Down
13 changes: 7 additions & 6 deletions tests/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,22 @@
<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<CollectCoverage>true</CollectCoverage>
<CoverletOutput>TestResults/</CoverletOutput>
<CoverletOutput>../../TestResults/$(MSBuildProjectName)/</CoverletOutput>
<CoverletOutputFormat>lcov</CoverletOutputFormat>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<WarningLevel>4</WarningLevel>
<AnalysisLevel>latest</AnalysisLevel>
<OutputPath>../../bin/tests/$(MSBuildProjectName)</OutputPath>
<OverwriteReadOnlyFiles>true</OverwriteReadOnlyFiles>
<TestingPlatformShowTestsFailure>true</TestingPlatformShowTestsFailure>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="coverlet.collector" Version="6.0.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PackageReference Include="coverlet.collector" Version="6.0.4" >
<IncludeAssets>all</IncludeAssets>
</PackageReference>
<PackageReference Include="coverlet.msbuild" Version="6.0.4">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<IncludeAssets>all</IncludeAssets>
</PackageReference>
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<EnableMSTestRunner>true</EnableMSTestRunner>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<RootNamespace>neo_cli.Tests</RootNamespace>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<EnableMSTestRunner>true</EnableMSTestRunner>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<RootNamespace>Neo.Cryptography.MPT.Tests</RootNamespace>
</PropertyGroup>

<ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions tests/Neo.Network.RPC.Tests/Neo.Network.RPC.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<EnableMSTestRunner>true</EnableMSTestRunner>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<RootNamespace>Neo.Network.RPC.Tests</RootNamespace>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<RootNamespace>Neo.Plugins.ApplicationsLogs.Tests</RootNamespace>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<EnableMSTestRunner>true</EnableMSTestRunner>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<PackageId>OracleService.Tests</PackageId>
<RootNamespace>Neo.Plugins</RootNamespace>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<EnableMSTestRunner>true</EnableMSTestRunner>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<RootNamespace>Neo.Plugins.RpcServer.Tests</RootNamespace>
<AssemblyName>Neo.Plugins.RpcServer.Tests</AssemblyName>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<EnableMSTestRunner>true</EnableMSTestRunner>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<RootNamespace>Neo.Plugins.Storage.Tests</RootNamespace>
</PropertyGroup>

<ItemGroup>
Expand Down
3 changes: 1 addition & 2 deletions tests/Neo.VM.Tests/Neo.VM.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<EnableMSTestRunner>true</EnableMSTestRunner>
<OutputType>Exe</OutputType>
<TargetFramework>net9.0</TargetFramework>
<RootNamespace>Neo.Test</RootNamespace>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>

Expand Down