diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c5f315dd27..754b879b0e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -24,7 +24,7 @@ jobs: - name: Check Format (*.cs) run: dotnet format --verify-no-changes --verbosity diagnostic - Build-Test-Neo-Cli: + Test-Everything: needs: [Format] timeout-minutes: 15 runs-on: ubuntu-latest @@ -37,16 +37,16 @@ jobs: with: dotnet-version: ${{ env.DOTNET_VERSION }} - - name: Build (Neo.CLI) - run: dotnet build ./src/Neo.CLI --output ./out/Neo.CLI + - name: Build (Everything) + run: dotnet build - name: Install dependencies run: | sudo apt-get install libleveldb-dev expect - find ./out -name 'config.json' | xargs perl -pi -e 's|LevelDBStore|MemoryStore|g' + find ./bin -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 + run: expect ./scripts/Neo.CLI/test-neo-cli.exp Test: needs: [Format] diff --git a/scripts/Neo.CLI/test-neo-cli.expect b/scripts/Neo.CLI/test-neo-cli.exp similarity index 80% rename from scripts/Neo.CLI/test-neo-cli.expect rename to scripts/Neo.CLI/test-neo-cli.exp index 8319c18f8e..e7124402c3 100644 --- a/scripts/Neo.CLI/test-neo-cli.expect +++ b/scripts/Neo.CLI/test-neo-cli.exp @@ -1,12 +1,12 @@ -#!/usr/bin/expect -f +#!/usr/bin/expect -d -f # # This script uses expect to test neo-cli # set timeout 10 - +exp_internal true # Start neo-cli -spawn dotnet out/Neo.CLI/neo-cli.dll +spawn dotnet ./bin/Neo.CLI/net8.0/neo-cli.dll # Expect the main input prompt expect { @@ -18,7 +18,7 @@ expect { # # Test 'create wallet' # -send "create wallet test-wallet1.json\n" +send "create wallet ./bin/Neo.CLI/test-wallet1.json\n" expect { "password:" { send "asd\n" } @@ -42,7 +42,7 @@ expect { # # Test 'create wallet' # -send "create wallet test-wallet2.json L2ArHTuiDL4FHu4nfyhamrG8XVYB4QyRbmhj7vD6hFMB5iAMSTf6\n" +send "create wallet ./bin/Neo.CLI/test-wallet2.json L2ArHTuiDL4FHu4nfyhamrG8XVYB4QyRbmhj7vD6hFMB5iAMSTf6\n" expect { "password:" { send "abcd\n" }