-
Notifications
You must be signed in to change notification settings - Fork 3.4k
51 lines (44 loc) · 1.46 KB
/
test-network-hsm.yaml
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
#
# SPDX-License-Identifier: Apache-2.0
#
name: Test Network HSM 🍏
run-name: ${{ github.actor }} is running the Test Network HSM tests 🍏
on:
workflow_dispatch:
push:
branches: [ "main", "release-2.5" ]
pull_request:
branches: [ "main", "release-2.5" ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
hsm:
runs-on: ${{ github.repository == 'hyperledger/fabric-samples' && 'fabric-ubuntu-22.04' || 'ubuntu-22.04' }}
strategy:
matrix:
chaincode-language:
- go
- javascript
- typescript
- java
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up the test network runtime
uses: ./.github/actions/test-network-setup
- name: Install SoftHSM
run: sudo apt install -y softhsm2
- name: Set up SoftHSM
env:
TMPDIR: ${{ runner.temp }}
SOFTHSM2_CONF: ${{ github.workspace }}/softhsm2.conf
run: |
echo "directories.tokendir = ${TMPDIR}" > "${SOFTHSM2_CONF}"
softhsm2-util --init-token --slot 0 --label "ForFabric" --pin 98765432 --so-pin 1234
- name: Run Test Network HSM
working-directory: test-network
env:
CHAINCODE_LANGUAGE: ${{ matrix.chaincode-language }}
SOFTHSM2_CONF: ${{ github.workspace }}/softhsm2.conf
run: ../ci/scripts/run-test-network-hsm.sh