Skip to content

Commit e4c9951

Browse files
committed
NVM use for chaincode unit tests
Signed-off-by: Jakub Dzikowski <jakub.t.dzikowski@gmail.com> Signed-off-by: dzikowski <jakub.t.dzikowski@gmail.com>
1 parent f7744d3 commit e4c9951

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/test-on-push.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
runs-on: ubuntu-latest
4545
timeout-minutes: 30
4646
steps:
47-
47+
4848
- name: Check out repository code
4949
uses: actions/checkout@v2
5050

@@ -176,16 +176,25 @@ jobs:
176176
- name: Check out repository code
177177
uses: actions/checkout@v2
178178

179+
- name: Install NVM
180+
run: |
181+
curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh
182+
export NVM_DIR="$HOME/.nvm"
183+
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
184+
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
185+
179186
- name: Test chaincode for Fabric 1.4.x
180187
run: |
181188
cd samples/chaincodes/chaincode-kv-node-1.4 && \
189+
nvm use && \
182190
npm install && \
183191
npm run build && \
184192
npm run test
185193
186194
- name: Test chaincode for Fabric 2.x
187195
run: |
188196
cd samples/chaincodes/chaincode-kv-node && \
197+
nvm use && \
189198
npm install && \
190199
npm run build && \
191200
npm run test

0 commit comments

Comments
 (0)