-
Notifications
You must be signed in to change notification settings - Fork 37
99 lines (75 loc) · 2.54 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
name: Run Test
on:
workflow_call:
env:
CONFIGURATION: 'Release'
DOTNET_VERSION: '9.0.x'
jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Restore
run: dotnet restore neo-express.sln
- name: Format
run: |
dotnet format neo-express.sln --verify-no-changes --no-restore --verbosity diagnostic
build:
needs: [format]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Nerdbank.GitVersioning
uses: dotnet/[email protected]
id: nbgv
- name: Restore
run: dotnet restore neo-express.sln
- name: Build
run: dotnet build neo-express.sln --configuration ${{ env.CONFIGURATION }} --no-restore --verbosity normal
- name: Test
run: dotnet test neo-express.sln --configuration ${{ env.CONFIGURATION }} --no-build --verbosity normal
- name: Pack for Install
run: dotnet pack neo-express.sln --configuration ${{ env.CONFIGURATION }} --output ./out --no-build --verbosity normal
- name: Install neoxp tool
run: dotnet tool install --add-source ./out --verbosity normal --global --prerelease neo.express
- name: Test Create Command (neoxp)
run: neoxp create
- name: Test Checkpoint Command (offline) (neoxp)
run: neoxp checkpoint create checkpoints/init --force
- name: Test Policy Command (offline) (neoxp)
run: |
neoxp policy get --rpc-uri mainnet --json > mainnet-policy.json
neoxp policy sync mainnet-policy --account genesis
- name: Test Wallet Command (neoxp)
run: |
neoxp wallet create bob
- name: Test Transfer Command (offline) (neoxp)
run: |
neoxp transfer 10000 gas genesis node1
neoxp transfer 10000 gas genesis bob
- name: Test Run Command (online) (neoxp)
timeout-minutes: 1
run: neoxp run --seconds-per-block 3 --discard &
- name: Test Transfer Command (online) (neoxp)
run: |
neoxp transfer 10000 gas genesis node1
neoxp transfer 10000 gas genesis bob
- name: Test Stop Command (online) (neoxp)
run: neoxp stop --all