-
Notifications
You must be signed in to change notification settings - Fork 18
93 lines (77 loc) · 2.49 KB
/
run-tests.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
name: Run tests
on:
push:
workflow_call:
inputs:
branch:
description: "The branch on which to run this workflow"
required: true
type: string
it_branch:
description: "The integration tests branch on which to run this workflow"
required: true
type: string
jobs:
run-unit-tests:
name: Unit tests
runs-on: ubuntu-20.04
steps:
- name: Checkout this repo
uses: actions/checkout@v3
with:
ref: ${{ inputs.branch }}
- name: Build the middleware docker image
run: docker/mware/build
- name: Middleware tests
run: middleware/test-all
- name: Ledger tests for TCPSigner
run: ledger/test/test-all
- name: Ledger Signer's tests
run: ledger/src/signer/test/run-all.sh
- name: Ledger UI's tests
run: ledger/src/ui/test/run-all.sh
- name: Ledger common lib tests
working-directory: ledger/src/common/test/
run: |
for d in memutil ints; do
(cd "$d" && make clean test)
done
- name: Ledger TCPSigner's tests
working-directory: ledger/src/tcpsigner/test/
run: |
for d in hmac_sha256; do
(cd "$d" && make clean test)
done
run-integration-tests:
name: Integration tests
runs-on: ubuntu-20.04
steps:
- name: Checkout rsk-powhsm repo
uses: actions/checkout@v3
with:
path: rsk-powhsm
ref: ${{ inputs.branch }}
- name: Build required software
working-directory: rsk-powhsm
run: |
docker/mware/build
docker/packer/build
middleware/build/manager-tcp
ledger/build/build-tcpsigner
- name: Checkout hsm-integration-test repo
uses: actions/checkout@v3
with:
repository: rootstock/hsm-integration-test
ref: ${{ inputs.it_branch || 4.0.0.plus }}
path: hsm-integration-test
ssh-key: ${{ secrets.HSM_INTEGRATION_TEST_SSH_KEY }}
- name: Copy required files
run: |
mkdir hsm-integration-test/docker/manager/manager-tcp
tar -xzf rsk-powhsm/middleware/bin/manager-tcp.tgz \
-C hsm-integration-test/docker/manager/manager-tcp
cp rsk-powhsm/ledger/src/tcpsigner/tcpsigner \
hsm-integration-test/docker/tcpsigner/
- name: Run HSM integration tests
working-directory: hsm-integration-test
run: sh smoke-test.sh