-
Notifications
You must be signed in to change notification settings - Fork 67
Expand file tree
/
Copy pathaction.yml
More file actions
92 lines (77 loc) · 2.5 KB
/
action.yml
File metadata and controls
92 lines (77 loc) · 2.5 KB
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
name: 'Run e2e test'
description: 'Run single e2e test.'
inputs:
node-count:
description: 'Number of nodes to run.'
required: false
default: '5'
min-validator-count:
description: 'Minimum number of nodes below which chain enters emergency state.'
required: false
default: '4'
test-case:
description: 'Name of test to run.'
required: true
randomized:
description: 'Whether to use randomized test params.'
required: false
default: 'false'
reserved-seats:
description: 'Number of reserved seats available to validators.'
required: false
non-reserved-seats:
description: 'Number of non-reserved seats available to validators.'
required: false
follow-up-finalization-check:
description: 'Whether to run a follow-up finalization check.'
required: false
runs:
using: 'composite'
steps:
- name: Download artifact with docker image
uses: actions/download-artifact@v2
with:
name: aleph-test-docker
- name: Load node docker image
shell: bash
run: docker load -i aleph-node.tar
- name: Run consensus party
shell: bash
run: ./.github/scripts/run_consensus.sh -m ${{ inputs.min-validator-count }} -n ${{ inputs.node-count }}
- name: Sleep
shell: bash
run: sleep 60
- name: Display bootnode logs
shell: bash
run: docker logs Node0 --follow &
- name: Download artifact with the test suite image
uses: actions/download-artifact@v2
with:
name: aleph-e2e-client
- name: Load test suite docker image
shell: bash
run: docker load -i aleph-e2e-client.tar
- name: Run single e2e test
shell: bash
run: |
ARGS=(
-t "${{ inputs.test-case }}"
-r "${{ inputs.randomized }}"
-m "${{ inputs.min-validator-count }}"
)
RESERVED_SEATS="${{ inputs.reserved-seats }}"
NON_RESERVED_SEATS="${{ inputs.non-reserved-seats }}"
if [[ -n "${RANDOMIZED}" ]]; then
ARGS+=(-r "${RANDOMIZED}")
fi
if [[ -n "${RESERVED_SEATS}" && -n "${NON_RESERVED_SEATS}" ]]; then
ARGS+=(
-f "${RESERVED_SEATS}"
-n "${NON_RESERVED_SEATS}"
)
fi
./.github/scripts/run_e2e_test.sh "${ARGS[@]}"
- name: Run finalization e2e test
if: inputs.follow-up-finalization-check == 'true'
shell: bash
run: ./.github/scripts/run_e2e_test.sh -t finalization::finalization -m "${{ inputs.min-validator-count }}"