-
Notifications
You must be signed in to change notification settings - Fork 16
91 lines (81 loc) · 2.67 KB
/
Copy pathchainspec-sync-check.yml
File metadata and controls
91 lines (81 loc) · 2.67 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
name: Chainspec sync check
on:
push:
branches: [main]
pull_request:
branches: [main]
paths:
- 'chainspecs/**'
- '.github/workflows/chainspec-sync-check.yml'
- '.github/env'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
set-image:
uses: ./.github/workflows/set-image.yml
# Pre-warm the binary cache once. Cross-workflow concurrency lives in the
# reusable workflow so all PR-wide prepares for the same SHA serialize.
setup:
needs: [set-image]
uses: ./.github/workflows/prepare-polkadot-binaries.yml
with:
groups: polkadot-node
image: ${{ needs.set-image.outputs.CI_IMAGE }}
sync-check:
needs: [set-image, setup]
name: Sync (${{ matrix.name }})
runs-on: parity-large
container:
image: ${{ needs.set-image.outputs.CI_IMAGE }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- name: polkadot
chainspec: chainspecs/polkadot-chainspec.json
relay_rpc: wss://rpc.polkadot.io
- name: westend
chainspec: chainspecs/westend-chainspec.json
relay_rpc: wss://westend-rpc.polkadot.io
- name: paseo-next
chainspec: chainspecs/paseo-next-chainspec.json
relay_rpc: wss://paseo.dotters.network
- name: paseo-next-v2
chainspec: chainspecs/paseo-next-v2-chainspec.json
relay_rpc: wss://paseo.dotters.network
steps:
- name: Checkout sources
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Set up Polkadot binaries
uses: ./.github/actions/use-polkadot-binaries
with:
groups: polkadot-node
mode: consume
- name: Sync a few blocks
env:
CHAINSPEC: ${{ matrix.chainspec }}
RELAY_RPC: ${{ matrix.relay_rpc }}
run: ./scripts/chainspec_sync_check.sh "$CHAINSPEC" "$RELAY_RPC"
- name: Upload omni-node log on failure
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: omni-node-${{ matrix.name }}.log
path: omni-node.log
retention-days: 7
sync-check-complete:
name: All chainspec sync checks passed
needs: [setup, sync-check]
if: always()
runs-on: ubuntu-latest
steps:
- name: Decide outcome
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
run: |
echo "Chainspec sync check failed or was cancelled"
exit 1