Skip to content

Commit 8daa968

Browse files
committed
Merge branch 'polkadot-stable2506' into pallet_glutton
2 parents 75e89bf + 043205c commit 8daa968

File tree

246 files changed

+5604
-3489
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

246 files changed

+5604
-3489
lines changed

.github/actions/artifacts/build-pc-artifacts/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,5 +101,5 @@ runs:
101101
- name: Upload partner-chains-demo-node artifact
102102
uses: actions/upload-artifact@v4
103103
with:
104-
name: partner-chains-demo-node-${{ inputs.os }}-artifact
105-
path: ${{ env.PARTNER_CHAINS_NODE }}
104+
name: partner-chains-node-${{ inputs.os }}-artifact
105+
path: ${{ env.PARTNER_CHAINS_NODE }}

.github/actions/artifacts/generate-chain-specs/action.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ runs:
2323
./partner-chains-node-${{ inputs.tag }}-x86_64-linux build-spec --chain staging --disable-default-bootnode > ci_preview_chain_spec.json
2424
source ./dev/envs/staging-preview/.envrc
2525
./partner-chains-node-${{ inputs.tag }}-x86_64-linux build-spec --chain staging --disable-default-bootnode > staging_preview_chain_spec.json
26-
source ./dev/envs/staging-preprod/.envrc
27-
./partner-chains-node-${{ inputs.tag }}-x86_64-linux build-spec --chain staging --disable-default-bootnode > staging_preprod_chain_spec.json
2826
- name: Upload Chain Specs
2927
uses: actions/upload-artifact@v4
3028
with:
@@ -33,4 +31,3 @@ runs:
3331
devnet_chain_spec.json
3432
ci_preview_chain_spec.json
3533
staging_preview_chain_spec.json
36-
staging_preprod_chain_spec.json

.github/actions/deploy/deploy-staging-preprod/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: "Deploy staging-preprod"
1+
name: "Deploy staging-preprod - THERE ARE NO VALID CHAIN SPECS FOR PREPROD"
22
description: "Deploys the staging-preprod environment with chain-spec and image override using Kubernetes and Helm."
33
inputs:
44
image:

.github/actions/deploy/upload-chain-specs/action.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Upload Chain Spec Artifacts to Kubernetes PVC
2-
description: Uploads chain‑spec artifacts to PVCs for devnet, staging‑preview and staging‑preprod.
2+
description: Uploads chain‑spec artifacts to PVCs for devnet and staging‑preview.
33

44
inputs:
55
sha:
@@ -53,7 +53,3 @@ runs:
5353
if [ -f ./staging_preview_chain_spec.json ]; then
5454
kubectl cp ./staging_preview_chain_spec.json staging-preview/pvc-uploader-staging-preview:/mnt/chain-spec/staging-preview-chain-spec-${{ inputs.sha }}.json
5555
fi
56-
57-
if [ -f ./staging_preprod_chain_spec.json ]; then
58-
kubectl cp ./staging_preprod_chain_spec.json staging-preprod/pvc-uploader-staging-preprod:/mnt/chain-spec/staging-preprod-chain-spec-${{ inputs.sha }}.json
59-
fi

.github/actions/tests/local-environment-tests/action.yml

Lines changed: 56 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ inputs:
1010
tag:
1111
description: "PC Artifact Tag"
1212
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'
1515
required: true
1616

1717
outputs: {}
@@ -23,39 +23,47 @@ runs:
2323
uses: actions/checkout@v4
2424
with:
2525
ref: ${{ inputs.sha }}
26+
2627
- name: Acquire AWS credentials
2728
uses: aws-actions/configure-aws-credentials@v4
2829
with:
2930
role-to-assume: ${{ env.AWS_ROLE_ARN_SECRET }}
3031
aws-region: ${{ env.AWS_REGION }}
32+
3133
- name: Login to ECR
3234
uses: docker/login-action@v3
3335
with:
3436
registry: ${{ env.ECR_REGISTRY_SECRET }}
37+
3538
- name: Deploy local environment
3639
run: |
3740
mkdir -p dev/local-environment/configurations/tests/e2e-tests
3841
cp -r e2e-tests/* dev/local-environment/configurations/tests/e2e-tests
3942
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
4148
docker compose up -d
4249
cd ../../
4350
shell: bash
51+
4452
- name: Wait for partner-chains-node-1 to start
4553
id: wait-pc-node
4654
continue-on-error: true
4755
run: |
4856
# Wait for the Cardano node to be ready
4957
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..."
5159
INIT_TIMESTAMP=$(docker exec cardano-node-1 cat /shared/cardano.start)
5260
echo "INIT_TIMESTAMP=$INIT_TIMESTAMP" >> $GITHUB_ENV
5361
5462
epoch=0
5563
restart_count=0
5664
max_restarts=10
5765
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
5967
while ! docker exec partner-chains-node-1 [ -e /shared/partner-chains-node-1.ready ]; do
6068
epoch=$(docker exec cardano-node-1 cardano-cli latest query tip --testnet-magic 42 | jq -r .epoch)
6169
echo "Epoch: $epoch"
@@ -78,108 +86,118 @@ runs:
7886
sleep 10
7987
done
8088
shell: bash
89+
8190
- name: Collect Docker logs
8291
run: |
83-
mkdir -p local-environment-logs-initial
92+
mkdir -p local-environment-${{ inputs.markers }}-logs-initial
8493
docker ps -a --format '{{.Names}}' | while read line; do
8594
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
8796
done
8897
shell: bash
98+
8999
- name: Upload Docker logs artifact
90100
uses: actions/upload-artifact@v4
91101
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+
94105
- name: Fail the job
95106
if: ${{ steps.wait-pc-node.outcome == 'failure' }}
96107
run: exit 1
97108
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
106111
uses: ./.github/actions/tests/wait-for-epoch
107112
with:
108113
epoch: 2
109114
deployment: docker
110115
node: cardano-node-1
111116
environment:
117+
112118
- name: Let PC warm up
113119
run: |
114120
sleep 30
115121
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' }}
117125
uses: ./.github/actions/tests/run-e2e-tests
118126
with:
119127
env: ${{ env.TEST_ENVIRONMENT }}
120128
init_timestamp: ${{ env.INIT_TIMESTAMP }}
121129
blockchain: substrate
122-
markers: "not probability and not rpc"
130+
markers: ${{ inputs.markers }}
123131
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' }}
126135
uses: ./.github/actions/tests/wait-for-epoch
127136
with:
128137
epoch: 3
129138
deployment: docker
130139
node: cardano-node-1
131140
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' }}
134144
uses: ./.github/actions/tests/run-e2e-tests
135145
with:
136146
env: ${{ env.TEST_ENVIRONMENT }}
137147
init_timestamp: ${{ env.INIT_TIMESTAMP }}
138148
blockchain: substrate
139-
markers: "not probability"
149+
markers: ${{ inputs.markers }}
140150
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' }}
143154
uses: ./.github/actions/tests/wait-for-epoch
144155
with:
145156
epoch: 4
146157
deployment: docker
147158
node: cardano-node-1
148159
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' }}
151163
uses: ./.github/actions/tests/run-e2e-tests
152164
with:
153165
env: ${{ env.TEST_ENVIRONMENT }}
154166
mc_epoch: 3
155167
init_timestamp: ${{ env.INIT_TIMESTAMP }}
156168
blockchain: substrate
157-
markers: "not probability and not reserve"
169+
markers: ${{ inputs.markers }}
158170
local-environment: "true"
171+
159172
- name: Check if no skipped tests
160-
if: ${{ inputs.tests == 'postmerge' }}
161173
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
166181
fi
167182
shell: bash
183+
168184
- name: Collect container logs
169185
if: always()
170186
run: |
171-
mkdir -p local-environment-logs-full
187+
mkdir -p local-environment-${{ inputs.markers }}-logs-full
172188
docker ps -a --format '{{.Names}}' | while read line; do
173189
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
175191
done
176192
shell: bash
193+
177194
- name: Upload container logs
178195
if: always()
179196
uses: actions/upload-artifact@v4
180197
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+
183201
- name: Stop partner-chains-demo
184202
run: |
185203
cd dev/local-environment

.github/actions/tests/run-e2e-tests/action.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
name: 'Run Pytest Tests'
2+
23
description: 'Activate Python virtual environment and run end-to-end tests'
34

45
inputs:
@@ -10,7 +11,7 @@ inputs:
1011
required: false
1112
default: 'test_'
1213
markers:
13-
description: 'Run tests by markers (-m)'
14+
description: 'Run tests by markers (-m). Available markers: smoke, rpc, reserve, governed_map, delegator_rewards, ariadne, wizards or full'
1415
required: false
1516
mc_epoch:
1617
description: 'MC epoch to test (committee tests)'
@@ -53,7 +54,9 @@ runs:
5354
shell: bash
5455
run: |
5556
markers_switch=""
56-
if [ -n "${{ inputs.markers }}" ]; then
57+
if [ "${{ inputs.markers }}" = "wizards" ]; then
58+
markers_switch="-m smoke"
59+
elif [ -n "${{ inputs.markers }}" ]; then
5760
markers_switch="-m '${{ inputs.markers }}'"
5861
fi
5962
@@ -77,10 +80,10 @@ runs:
7780
decrypt_switch="--decrypt"
7881
fi
7982
83+
# Define pytest command
8084
pytest_cmd="pytest --blockchain '${{ inputs.blockchain }}' \
8185
--env '${{ inputs.env }}' \
8286
--log-cli-level '${{ inputs.log_level }}' \
83-
-k '${{ inputs.keyword }}' \
8487
${markers_switch} \
8588
-n '${{ inputs.threads}}' \
8689
--dist=loadgroup \
@@ -120,7 +123,7 @@ runs:
120123
- name: Upload test results
121124
uses: actions/upload-artifact@v4
122125
with:
123-
name: test-results
126+
name: test-results-${{ inputs.markers }}
124127
path: e2e-tests/logs
125128
overwrite: true
126129
if-no-files-found: error

0 commit comments

Comments
 (0)