Skip to content

Replay and Dry Run XCMs #21

Replay and Dry Run XCMs

Replay and Dry Run XCMs #21

name: Replay and Dry Run XCMs
on:
push:
branches: [master]
paths:
- 'polkadot-docs/chain-interactions/debug-and-preview-xcms/**'
- '!polkadot-docs/chain-interactions/debug-and-preview-xcms/README.md'
- 'versions.yml'
pull_request:
paths:
- 'polkadot-docs/chain-interactions/debug-and-preview-xcms/**'
- '!polkadot-docs/chain-interactions/debug-and-preview-xcms/README.md'
- 'versions.yml'
workflow_dispatch:
jobs:
guard:
if: github.repository == 'polkadot-developers/polkadot-cookbook'
runs-on: ubuntu-latest
outputs:
should-run: ${{ steps.check.outputs.should-run }}
steps:
- uses: actions/checkout@v4
- id: check
uses: ./.github/actions/check-version-keys
with:
event-name: ${{ github.event_name }}
base-sha: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }}
head-sha: ${{ github.sha }}
test:
needs: guard
if: needs.guard.outputs.should-run == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install npm dependencies
run: |
cd polkadot-docs/chain-interactions/debug-and-preview-xcms
npm ci
# Generate PAPI descriptors from the live Polkadot Asset Hub network
- name: Generate PAPI descriptors
run: |
cd polkadot-docs/chain-interactions/debug-and-preview-xcms
npx papi add polkadotHub -n polkadot_asset_hub
- name: Run tests
run: |
cd polkadot-docs/chain-interactions/debug-and-preview-xcms
npm test
timeout-minutes: 15
post-test:
needs: [guard, test]
if: github.repository == 'polkadot-developers/polkadot-cookbook' && needs.guard.outputs.should-run == 'true' && always() && github.ref == 'refs/heads/master'
uses: ./.github/workflows/post-cleanup.yml
with:
test_result: ${{ needs.test.result }}
readme_path: 'polkadot-docs/chain-interactions/debug-and-preview-xcms/README.md'
workflow_name: 'Replay and Dry Run XCMs'
permissions:
contents: read
issues: write