forked from neo-project/neo
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (44 loc) · 1.62 KB
/
test_devpack.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
name: Validate neo-devpack-dotnet Compilation with Local neo
on:
push:
branches: [check]
workflow_dispatch:
inputs:
ref:
description: 'Ref to build neo-devpack [default: latest master; examples: 3.6.0, 0a4ff9d3e4a9ab432fd5812eb18c98e03b5a7432]'
required: false
default: 'master'
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout neo
uses: actions/checkout@v4
with:
path: ./neo
- name: Checkout neo-devpack-dotnet
uses: actions/checkout@v4
with:
repository: neo-project/neo-devpack-dotnet
path: ./neo-devpack-dotnet
ref: ${{ github.event.inputs.ref }}
- name: Patch neo-devpack-dotnet .csproj to use local neo
run: |
# Remove the PackageReference to Neo
sed -i '/<PackageReference Include="Neo"/d' ./neo-devpack-dotnet/src/Neo.Compiler.CSharp/Neo.Compiler.CSharp.csproj
# Add a ProjectReference to the local Neo project
# Assuming the neo project's main .csproj is in its root directory
sed -i '/<\/ItemGroup>/i \ <ProjectReference Include="../../../neo/src/Neo/Neo.csproj" />' ./neo-devpack-dotnet/src/Neo.Compiler.CSharp/Neo.Compiler.CSharp.csproj
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '7.x' # Adjust according to the actual .NET Core version of neo-devpack-dotnet
- name: Restore and build neo-devpack-dotnet
run: |
cd neo-devpack-dotnet/
dotnet restore
dotnet build
- name: Test neo-devpack-dotnet
run: |
cd neo-devpack-dotnet
dotnet test