Refactor lottery pallet to use fungible traits #2614
Workflow file for this run
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
| name: check-runtime-compatibility | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| merge_group: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| permissions: {} | |
| jobs: | |
| isdraft: | |
| uses: ./.github/workflows/reusable-isdraft.yml | |
| preflight: | |
| needs: isdraft | |
| uses: ./.github/workflows/reusable-preflight.yml | |
| check-runtime-compatibility: | |
| runs-on: ${{ needs.preflight.outputs.RUNNER }} | |
| if: ${{ needs.preflight.outputs.changes_rust }} | |
| timeout-minutes: 30 | |
| needs: [preflight] | |
| container: | |
| image: ${{ needs.preflight.outputs.IMAGE }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| network: | |
| [ | |
| westend, | |
| asset-hub-westend, | |
| bridge-hub-westend, | |
| collectives-westend, | |
| coretime-westend, | |
| ] | |
| include: | |
| - network: westend | |
| package: westend-runtime | |
| wasm: westend_runtime.compact.compressed.wasm | |
| uri: "wss://try-runtime-westend.polkadot.io:443" | |
| - network: asset-hub-westend | |
| package: asset-hub-westend-runtime | |
| wasm: asset_hub_westend_runtime.compact.compressed.wasm | |
| uri: "wss://westend-asset-hub-rpc.polkadot.io:443" | |
| - network: bridge-hub-westend | |
| package: bridge-hub-westend-runtime | |
| wasm: bridge_hub_westend_runtime.compact.compressed.wasm | |
| uri: "wss://westend-bridge-hub-rpc.polkadot.io:443" | |
| - network: collectives-westend | |
| package: collectives-westend-runtime | |
| wasm: collectives_westend_runtime.compact.compressed.wasm | |
| uri: "wss://westend-collectives-rpc.polkadot.io:443" | |
| - network: coretime-westend | |
| package: coretime-westend-runtime | |
| wasm: coretime_westend_runtime.compact.compressed.wasm | |
| uri: "wss://westend-coretime-rpc.polkadot.io:443" | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Build Runtime | |
| id: build-runtime | |
| run: | | |
| echo "---------- Building ${{ matrix.package }} runtime with on-chain-release-build ----------" | |
| forklift cargo build --release --locked -p ${{ matrix.package }} --features on-chain-release-build -q | |
| - name: Setup Node.js | |
| uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0 | |
| with: | |
| node-version: "24.x" | |
| registry-url: "https://npm.pkg.github.com" | |
| - name: Check Runtime Compatibility | |
| id: check-compatibility | |
| run: | | |
| echo "---------- Checking runtime compatibility for ${{ matrix.network }} ----------" | |
| npx @polkadot-api/check-runtime@latest problems ${{ matrix.uri }} --wasm ./target/release/wbuild/${{ matrix.package }}/${{ matrix.wasm }} | |
| - name: Stop all workflows if failed | |
| if: ${{ failure() && (steps.build-runtime.conclusion == 'failure' || steps.check-compatibility.conclusion == 'failure') }} | |
| uses: ./.github/actions/workflow-stopper | |
| with: | |
| app-id: ${{ secrets.WORKFLOW_STOPPER_RUNNER_APP_ID }} | |
| app-key: ${{ secrets.WORKFLOW_STOPPER_RUNNER_APP_KEY }} | |
| # name of this job must be unique across all workflows | |
| # otherwise GitHub will mark all these jobs as required | |
| confirm-runtime-compatibility-checks-passed: | |
| runs-on: ubuntu-latest | |
| name: All runtime compatibility checks passed | |
| needs: [check-runtime-compatibility] | |
| if: always() && !cancelled() | |
| steps: | |
| - run: | | |
| tee resultfile <<< '${{ toJSON(needs) }}' | |
| FAILURES=$(cat resultfile | grep -E '"result": "(failure|cancelled)"' | wc -l) | |
| if [ $FAILURES -gt 0 ]; then | |
| echo "### At least one required job failed ❌" >> $GITHUB_STEP_SUMMARY | |
| exit 1 | |
| else | |
| echo '### Good job! All the required jobs passed 🚀' >> $GITHUB_STEP_SUMMARY | |
| fi |