|
17 | 17 | jobs:
|
18 | 18 |
|
19 | 19 | asset-exchange-fabric:
|
20 |
| - if: ${{ false }} # disable |
| 20 | + # if: ${{ false }} # disable |
21 | 21 | # The type of runner that the job will run on
|
22 | 22 | runs-on: ubuntu-latest
|
23 | 23 |
|
@@ -90,130 +90,6 @@ jobs:
|
90 | 90 | fi
|
91 | 91 | working-directory: samples/fabric/fabric-cli
|
92 | 92 |
|
93 |
| - asset-exchange-fabric-semi-local: |
94 |
| - # if: ${{ false }} # disable |
95 |
| - # The type of runner that the job will run on |
96 |
| - runs-on: ubuntu-latest |
97 |
| - |
98 |
| - # Steps represent a sequence of tasks that will be executed as part of the job |
99 |
| - steps: |
100 |
| - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it |
101 |
| - - uses: actions/checkout@v2 |
102 |
| - |
103 |
| - - name: Set up Go |
104 |
| - uses: actions/setup-go@v2 |
105 |
| - with: |
106 |
| - go-version: 1.16 |
107 |
| - |
108 |
| - - name: Use Node.js 14.x |
109 |
| - uses: actions/setup-node@v2 |
110 |
| - with: |
111 |
| - node-version: 14.x |
112 |
| - |
113 |
| - - name: Use Protoc 3.15 |
114 |
| - run: | |
115 |
| - curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.6/protoc-3.15.6-linux-x86_64.zip |
116 |
| - unzip protoc-3.15.6-linux-x86_64.zip -d protoc |
117 |
| - go get -u google.golang.org/protobuf/cmd/protoc-gen-go |
118 |
| - go get -u google.golang.org/grpc/cmd/protoc-gen-go-grpc |
119 |
| - |
120 |
| - # PROTOS |
121 |
| - - name: Build JS Protos |
122 |
| - run: | |
123 |
| - export PATH="$PATH:${GITHUB_WORKSPACE}/protoc/bin" |
124 |
| - make build |
125 |
| - working-directory: common/protos-js |
126 |
| - |
127 |
| - # Build Dependencies |
128 |
| - - name: Build Fabric Interop SDK |
129 |
| - run: make build-local |
130 |
| - working-directory: sdks/fabric/interoperation-node-sdk |
131 |
| - |
132 |
| - - name: Build Fabric CLI |
133 |
| - run: make build-local |
134 |
| - working-directory: samples/fabric/fabric-cli |
135 |
| - |
136 |
| - # FABRIC NETWORK |
137 |
| - # Use local InteropCC as Remote with go.mod instead of go.mod.local |
138 |
| - - name: Fetch interopcc |
139 |
| - run: | |
140 |
| - TMP_PATH=$PWD/../../../tests/network-setups/fabric/shared/tmp |
141 |
| - mkdir -p $TMP_PATH |
142 |
| - OLD_GOPATH=$GOPATH |
143 |
| - export GOPATH=$TMP_PATH |
144 |
| - echo "GO Path: ${GOPATH}" |
145 |
| - go get -d github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/contracts/interop |
146 |
| - chmod +wr -R $TMP_PATH/pkg/mod |
147 |
| - ls -lh $TMP_PATH/pkg/mod/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/contracts |
148 |
| - rm -rf $TMP_PATH/pkg/mod/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/contracts/interop*/* |
149 |
| - cp -r contracts/interop/* $TMP_PATH/pkg/mod/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/contracts/interop*/ |
150 |
| - ls -lh $TMP_PATH/pkg/mod/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/contracts/interop* |
151 |
| - export GOPATH=$OLD_GOPATH |
152 |
| - working-directory: core/network/fabric-interop-cc |
153 |
| - |
154 |
| - - name: Setup Interopcc |
155 |
| - run: | |
156 |
| - cd interop* |
157 |
| - go mod vendor |
158 |
| - ROOT_DIR=../../../../../../../../../../../../../../.. |
159 |
| - cp -r $ROOT_DIR/common/protos-go/* vendor/github.com/hyperledger-labs/weaver-dlt-interoperability/common/protos-go/ |
160 |
| - cp -r $ROOT_DIR/core/network/fabric-interop-cc/libs/assetexchange/* vendor/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/libs/assetexchange/ |
161 |
| - cp -r $ROOT_DIR/core/network/fabric-interop-cc/libs/utils/* vendor/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/libs/utils/ |
162 |
| - cp -r $ROOT_DIR/core/network/fabric-interop-cc/libs/testutils/* vendor/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/libs/testutils/ |
163 |
| - working-directory: tests/network-setups/fabric/shared/tmp/pkg/mod/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/contracts |
164 |
| - |
165 |
| - - name: Setup Simpleasset |
166 |
| - run: | |
167 |
| - go mod vendor |
168 |
| - cp -r ../../../common/protos-go/* vendor/github.com/hyperledger-labs/weaver-dlt-interoperability/common/protos-go/ |
169 |
| - cp -r ../../../core/network/fabric-interop-cc/interfaces/asset-mgmt/* vendor/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/interfaces/asset-mgmt/ |
170 |
| - cp -r ../../../core/network/fabric-interop-cc/libs/testutils/* vendor/github.com/hyperledger-labs/weaver-dlt-interoperability/core/network/fabric-interop-cc/libs/testutils/ |
171 |
| - working-directory: samples/fabric/simpleasset |
172 |
| - |
173 |
| - - name: Start Fabric Network |
174 |
| - run: make start-interop CHAINCODE_NAME=simpleasset |
175 |
| - working-directory: tests/network-setups/fabric/dev |
176 |
| - |
177 |
| - # FABRIC CLI |
178 |
| - - name: Setup Fabric CLI Config |
179 |
| - run: | |
180 |
| - echo ${GITHUB_WORKSPACE} |
181 |
| - cp config.template.json config.json |
182 |
| - sed -i "s#<PATH-TO-WEAVER>#${GITHUB_WORKSPACE}#g" config.json |
183 |
| - working-directory: samples/fabric/fabric-cli |
184 |
| - - name: Setup Fabric CLI ENV |
185 |
| - run: | |
186 |
| - echo ${GITHUB_WORKSPACE} |
187 |
| - cp .env.template .env |
188 |
| - ./bin/fabric-cli env set MEMBER_CREDENTIAL_FOLDER ${GITHUB_WORKSPACE}/samples/fabric/fabric-cli/src/data/credentials_docker |
189 |
| - ./bin/fabric-cli env set CONFIG_PATH ${GITHUB_WORKSPACE}/samples/fabric/fabric-cli/config.json |
190 |
| - cat .env |
191 |
| - working-directory: samples/fabric/fabric-cli |
192 |
| - |
193 |
| - - name: Fabric CLI Init |
194 |
| - run: ./scripts/initAsset.sh |
195 |
| - working-directory: samples/fabric/fabric-cli |
196 |
| - |
197 |
| - - name: Asset Exchange Fabric CLI Tests |
198 |
| - run: | |
199 |
| - COUNT=0 |
200 |
| - TOTAL=1 |
201 |
| -
|
202 |
| - # FABRIC2 - FABRIC1 |
203 |
| - ./bin/fabric-cli asset exchange-all --network1=network1 --network2=network2 --secret=secrettext --timeout-duration=100 bob:bond01:a04:alice:token1:100 &> tmp.out |
204 |
| - tail -n 2 tmp.out | grep "Asset Exchange Complete." && COUNT=$(( COUNT + 1 )) && echo "PASS" |
205 |
| - cat tmp.out |
206 |
| -
|
207 |
| - # RESULT |
208 |
| - echo "Passed $COUNT/$TOTAL Tests." |
209 |
| -
|
210 |
| - if [ $COUNT == $TOTAL ]; then |
211 |
| - exit 0 |
212 |
| - else |
213 |
| - exit 1 |
214 |
| - fi |
215 |
| - working-directory: samples/fabric/fabric-cli |
216 |
| - |
217 | 93 | asset-exchange-fabric-local:
|
218 | 94 | # The type of runner that the job will run on
|
219 | 95 | runs-on: ubuntu-latest
|
|
0 commit comments