@@ -10,8 +10,8 @@ inputs:
10
10
tag :
11
11
description : " PC Artifact Tag"
12
12
required : true
13
- tests :
14
- description : " Test set to run (premerge or postmerge) "
13
+ markers :
14
+ description : ' Run tests by markers (-m). Available markers: smoke, rpc, reserve, governed_map, delegator_rewards, ariadne, wizards or full '
15
15
required : true
16
16
17
17
outputs : {}
@@ -23,39 +23,47 @@ runs:
23
23
uses : actions/checkout@v4
24
24
with :
25
25
ref : ${{ inputs.sha }}
26
+
26
27
- name : Acquire AWS credentials
27
28
uses : aws-actions/configure-aws-credentials@v4
28
29
with :
29
30
role-to-assume : ${{ env.AWS_ROLE_ARN_SECRET }}
30
31
aws-region : ${{ env.AWS_REGION }}
32
+
31
33
- name : Login to ECR
32
34
uses : docker/login-action@v3
33
35
with :
34
36
registry : ${{ env.ECR_REGISTRY_SECRET }}
37
+
35
38
- name : Deploy local environment
36
39
run : |
37
40
mkdir -p dev/local-environment/configurations/tests/e2e-tests
38
41
cp -r e2e-tests/* dev/local-environment/configurations/tests/e2e-tests
39
42
cd dev/local-environment
40
- bash setup.sh --non-interactive --postgres-password azMpOp4mTqhlKDmgCVQr --node-image ${{ inputs.image }} --tests
43
+ if [ "${{ inputs.markers }}" = "wizards" ]; then
44
+ bash setup.sh --non-interactive --postgres-password azMpOp4mTqhlKDmgCVQr --node-image ${{ inputs.image }} --tests -d 5
45
+ else
46
+ bash setup.sh --non-interactive --postgres-password azMpOp4mTqhlKDmgCVQr --node-image ${{ inputs.image }} --tests
47
+ fi
41
48
docker compose up -d
42
49
cd ../../
43
50
shell : bash
51
+
44
52
- name : Wait for partner-chains-node-1 to start
45
53
id : wait-pc-node
46
54
continue-on-error : true
47
55
run : |
48
56
# Wait for the Cardano node to be ready
49
57
while ! docker exec cardano-node-1 [ -e /shared/cardano.ready ]; do sleep 1; done
50
- echo "Cardano network is ready! Waiting for Partner Chain first node to start..."
58
+ echo "Cardano network is ready! Waiting for partner-chains- node-1 to start..."
51
59
INIT_TIMESTAMP=$(docker exec cardano-node-1 cat /shared/cardano.start)
52
60
echo "INIT_TIMESTAMP=$INIT_TIMESTAMP" >> $GITHUB_ENV
53
61
54
62
epoch=0
55
63
restart_count=0
56
64
max_restarts=10
57
65
58
- # Wait for the Partner Chain node to be ready or until max restarts or epoch 2 is reached
66
+ # Wait for partner-chains- node-1 to be ready or until max restarts or epoch 2 is reached
59
67
while ! docker exec partner-chains-node-1 [ -e /shared/partner-chains-node-1.ready ]; do
60
68
epoch=$(docker exec cardano-node-1 cardano-cli latest query tip --testnet-magic 42 | jq -r .epoch)
61
69
echo "Epoch: $epoch"
@@ -78,108 +86,118 @@ runs:
78
86
sleep 10
79
87
done
80
88
shell : bash
89
+
81
90
- name : Collect Docker logs
82
91
run : |
83
- mkdir -p local-environment-logs-initial
92
+ mkdir -p local-environment-${{ inputs.markers }}- logs-initial
84
93
docker ps -a --format '{{.Names}}' | while read line; do
85
94
echo "Collecting logs for container $line"
86
- docker logs "$line" > "local-environment-logs-initial/$line.log" 2>&1 || true
95
+ docker logs "$line" > "local-environment-${{ inputs.markers }}- logs-initial/$line.log" 2>&1 || true
87
96
done
88
97
shell : bash
98
+
89
99
- name : Upload Docker logs artifact
90
100
uses : actions/upload-artifact@v4
91
101
with :
92
- name : local-environment-logs-initial
93
- path : local-environment-logs-initial/
102
+ name : local-environment-${{ inputs.markers }}-logs-initial
103
+ path : local-environment-${{ inputs.markers }}-logs-initial/
104
+
94
105
- name : Fail the job
95
106
if : ${{ steps.wait-pc-node.outcome == 'failure' }}
96
107
run : exit 1
97
108
shell : bash
98
- - name : Run smoke tests
99
- uses : ./.github/actions/tests/run-e2e-tests
100
- with :
101
- env : ${{ env.TEST_ENVIRONMENT }}
102
- keyword : " test_get_status or test_get_params"
103
- blockchain : substrate
104
- local-environment : " true"
105
- - name : Wait for epoch 2
109
+
110
+ - name : Wait for Epoch 2
106
111
uses : ./.github/actions/tests/wait-for-epoch
107
112
with :
108
113
epoch : 2
109
114
deployment : docker
110
115
node : cardano-node-1
111
116
environment :
117
+
112
118
- name : Let PC warm up
113
119
run : |
114
120
sleep 30
115
121
shell : bash
116
- - name : Run all tests (do not verify full MC epoch)
122
+
123
+ - name : Run Epoch 2 Tests
124
+ if : ${{ inputs.markers != 'full' && inputs.markers != 'ariadne' && inputs.markers != 'delegator_rewards' }}
117
125
uses : ./.github/actions/tests/run-e2e-tests
118
126
with :
119
127
env : ${{ env.TEST_ENVIRONMENT }}
120
128
init_timestamp : ${{ env.INIT_TIMESTAMP }}
121
129
blockchain : substrate
122
- markers : " not probability and not rpc "
130
+ markers : ${{ inputs.markers }}
123
131
local-environment : " true"
124
- - name : Wait for epoch 3
125
- if : ${{ inputs.tests == 'postmerge' }}
132
+
133
+ - name : Wait for Epoch 3
134
+ if : ${{ inputs.markers == 'full' || inputs.markers == 'ariadne' || inputs.markers == 'delegator_rewards' }}
126
135
uses : ./.github/actions/tests/wait-for-epoch
127
136
with :
128
137
epoch : 3
129
138
deployment : docker
130
139
node : cardano-node-1
131
140
environment :
132
- - name : Run all tests (do not verify full MC epoch)
133
- if : ${{ inputs.tests == 'postmerge' }}
141
+
142
+ - name : Run Epoch 3 Tests
143
+ if : ${{ inputs.markers == 'full' || inputs.markers == 'ariadne' || inputs.markers == 'delegator_rewards' }}
134
144
uses : ./.github/actions/tests/run-e2e-tests
135
145
with :
136
146
env : ${{ env.TEST_ENVIRONMENT }}
137
147
init_timestamp : ${{ env.INIT_TIMESTAMP }}
138
148
blockchain : substrate
139
- markers : " not probability "
149
+ markers : ${{ inputs.markers }}
140
150
local-environment : " true"
141
- - name : Wait for epoch 4
142
- if : ${{ inputs.tests == 'postmerge' }}
151
+
152
+ - name : Wait for Epoch 4
153
+ if : ${{ inputs.markers == 'full' || inputs.markers == 'ariadne' }}
143
154
uses : ./.github/actions/tests/wait-for-epoch
144
155
with :
145
156
epoch : 4
146
157
deployment : docker
147
158
node : cardano-node-1
148
159
environment :
149
- - name : Run all tests
150
- if : ${{ inputs.tests == 'postmerge' }}
160
+
161
+ - name : Run Epoch 4 Tests
162
+ if : ${{ inputs.markers == 'full' || inputs.markers == 'ariadne' }}
151
163
uses : ./.github/actions/tests/run-e2e-tests
152
164
with :
153
165
env : ${{ env.TEST_ENVIRONMENT }}
154
166
mc_epoch : 3
155
167
init_timestamp : ${{ env.INIT_TIMESTAMP }}
156
168
blockchain : substrate
157
- markers : " not probability and not reserve "
169
+ markers : ${{ inputs.markers }}
158
170
local-environment : " true"
171
+
159
172
- name : Check if no skipped tests
160
- if : ${{ inputs.tests == 'postmerge' }}
161
173
run : |
162
- skipped=$(jq -r .summary.skipped e2e-tests/logs/.report.json)
163
- if [ "$skipped" != "null" ]; then
164
- echo "Skipped tests found: $skipped. Check test logs for more information."
165
- exit 1
174
+ report_path="e2e-tests/${{ inputs.markers }}/logs/.report.json"
175
+ if [ -f "$report_path" ]; then
176
+ skipped=$(jq -r .summary.skipped "$report_path")
177
+ if [ "$skipped" != "null" ]; then
178
+ echo "Skipped tests found: $skipped. Check test logs for more information."
179
+ exit 1
180
+ fi
166
181
fi
167
182
shell : bash
183
+
168
184
- name : Collect container logs
169
185
if : always()
170
186
run : |
171
- mkdir -p local-environment-logs-full
187
+ mkdir -p local-environment-${{ inputs.markers }}- logs-full
172
188
docker ps -a --format '{{.Names}}' | while read line; do
173
189
echo "Collecting logs for container $line"
174
- docker logs "$line" > "local-environment-logs-full/$line.log" 2>&1 || true
190
+ docker logs "$line" > "local-environment-${{ inputs.markers }}- logs-full/$line.log" 2>&1 || true
175
191
done
176
192
shell : bash
193
+
177
194
- name : Upload container logs
178
195
if : always()
179
196
uses : actions/upload-artifact@v4
180
197
with :
181
- name : local-environment-logs-full
182
- path : local-environment-logs-full/
198
+ name : local-environment-${{ inputs.markers }}-logs-full
199
+ path : local-environment-${{ inputs.markers }}-logs-full/
200
+
183
201
- name : Stop partner-chains-demo
184
202
run : |
185
203
cd dev/local-environment
0 commit comments