Skip to content

fix namespace

fix namespace #4

Workflow file for this run

name: .NET Core Test and Publish
on:
push:
branches: [master]
pull_request:
env:
DOTNET_VERSION: 8.0.x
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
Build-Test-Neo-Cli:
needs: [Format]
timeout-minutes: 15
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: Build (Neo.CLI)
run: dotnet build ./src/Neo.CLI --output ./out/Neo.CLI
- name: Install dependencies
run: |
sudo apt-get install libleveldb-dev expect
find ./out -name 'config.json' | xargs perl -pi -e 's|LevelDBStore|MemoryStore|g'
- name: Run tests with expect
run: expect ./scripts/Neo.CLI/test-neo-cli.expect
Test:
needs: [Format]
timeout-minutes: 15
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Test
if: matrix.os != 'ubuntu-latest'
run: |
dotnet sln neo.sln remove ./tests/Neo.Plugins.Storage.Tests/Neo.Plugins.Storage.Tests.csproj
dotnet test
- 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
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 --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/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
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]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Set Version
run: git rev-list --count HEAD | xargs printf 'CI%05d' | xargs -I{} echo 'VERSION_SUFFIX={}' >> $GITHUB_ENV
- name : Pack (Neo)
run: |
dotnet pack \
--configuration Release \
--output ./out \
--version-suffix ${{ env.VERSION_SUFFIX }}
- name: Remove Unwanted Files
working-directory: ./out
run: |
rm -v Neo.CLI*
rm -v Neo.GUI*
- name: Publish to Github Packages
working-directory: ./out
run: |
dotnet nuget push * \
--source https://nuget.pkg.github.com/neo-project/index.json \
--api-key "${{ secrets.GITHUB_TOKEN }}" \
--disable-buffering \
--no-service-endpoint
- name: Publish to myGet
working-directory: ./out
run: |
dotnet nuget push * \
--source https://www.myget.org/F/neo/api/v3/index.json \
--api-key "${{ secrets.MYGET_TOKEN }}" \
--disable-buffering \
--no-service-endpoint