This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
add Extrinsic Ordering check that runs against a local reference node
#5790
Merged
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
d9adf1b
add `Extrinsic Ordering` check that runs against a local reference node
coderobe 3271a0f
cleanup
coderobe ee7aef5
use different polkadot base path
coderobe f188af0
check all chains & other review nits
coderobe ee3e186
fixup
coderobe 8383e8a
review nits
coderobe 789e0e0
do not fail-fast
coderobe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
95 changes: 95 additions & 0 deletions
95
.github/workflows/release-21_extrinsic-ordering-check-from-two.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| # This workflow performs the Extrinsic Ordering Check on demand using two reference binaries | ||
|
|
||
| name: Release - Extrinsic API Check with reference bins | ||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| reference_binary_url: | ||
| description: A url to a Linux binary for the node containing the reference runtime to test against | ||
| default: https://releases.parity.io/polkadot/x86_64-debian:stretch/v0.9.26/polkadot | ||
| required: true | ||
| binary_url: | ||
| description: A url to a Linux binary for the node containing the runtime to test | ||
| default: https://releases.parity.io/polkadot/x86_64-debian:stretch/v0.9.27-rc1/polkadot | ||
| required: true | ||
|
|
||
| jobs: | ||
| check: | ||
| name: Run check | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| BIN_URL: ${{github.event.inputs.binary_url}} | ||
| REF_URL: ${{github.event.inputs.reference_binary_url}} | ||
| strategy: | ||
| matrix: | ||
| chain: [polkadot, kusama, westend, rococo] | ||
|
|
||
| steps: | ||
| - name: Checkout sources | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Fetch reference binary | ||
| run: | | ||
| echo Fetching $REF_URL | ||
| curl $REF_URL -o polkadot-ref | ||
| chmod a+x polkadot-ref | ||
| ./polkadot-ref --version | ||
|
|
||
| - name: Fetch test binary | ||
| run: | | ||
| echo Fetching $BIN_URL | ||
| curl $BIN_URL -o polkadot | ||
| chmod a+x polkadot | ||
| ./polkadot --version | ||
|
|
||
| - name: Start local reference node | ||
| run: | | ||
| echo Running reference on ${{ matrix.chain }} | ||
coderobe marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ./polkadot-ref --chain=${{ matrix.chain }}-local --rpc-port=9934 --ws-port=9945 --base-path=polkadot-ref-base/ & | ||
|
|
||
| - name: Start local test node | ||
| run: | | ||
| echo Running test on ${{ matrix.chain }} | ||
coderobe marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ./polkadot --chain=${{ matrix.chain }}-local & | ||
|
|
||
| - name: Prepare output | ||
| run: | | ||
| VERSION=$(./polkadot --version) | ||
| echo "Metadata comparison:" >> output.txt | ||
| echo "Date: $(date)" >> output.txt | ||
| echo "Reference: $REF_URL" >> output.txt | ||
coderobe marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| echo "Test binary: $BIN_URL" >> output.txt | ||
| echo "Target version: $VERSION" >> output.txt | ||
| echo "Local chain: ${{ matrix.chain }}" >> output.txt | ||
coderobe marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| echo "----------------------------------------------------------------------" >> output.txt | ||
|
|
||
| - name: Pull polkadot-js-tools image | ||
| run: docker pull jacogr/polkadot-js-tools | ||
|
|
||
| - name: Compare the metadata | ||
| run: | | ||
| CMD="docker run --pull always --network host jacogr/polkadot-js-tools metadata ws://localhost:9945 ws://localhost:9944" | ||
| echo -e "Running:\n$CMD" | ||
| $CMD >> output.txt | ||
| sed -z -i 's/\n\n/\n/g' output.txt | ||
| cat output.txt | egrep -n -i '' | ||
| SUMMARY=$(./scripts/ci/github/extrinsic-ordering-filter.sh output.txt) | ||
| echo -e $SUMMARY | ||
| echo -e $SUMMARY >> output.txt | ||
|
|
||
| - name: Show result | ||
| run: | | ||
| cat output.txt | ||
|
|
||
| - name: Save output as artifact | ||
| uses: actions/upload-artifact@v3 | ||
| with: | ||
| name: ${{ matrix.chain }} | ||
| path: | | ||
| output.txt | ||
|
|
||
| - name: Stop our local nodes | ||
| run: | | ||
| pkill polkadot-ref | ||
| pkill polkadot | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.