storing large file in bulletin #627
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: CI | |
| # Controls when the action will run. | |
| on: | |
| # Triggers the workflow on push or pull request events but only for the master branch | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| # Cancel previous runs | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| # Parity CI image to use | |
| # Common variable is defined in the workflow | |
| # Repo env variable doesn't work for PRs from forks | |
| env: | |
| CI_IMAGE: "paritytech/ci-unified:bullseye-1.88.0-2025-06-27-v202507112050" | |
| jobs: | |
| set-image: | |
| # This workaround sets the container image for each job using 'set-image' job output. | |
| # env variables don't work for PRs from forks, so we need to use outputs. | |
| runs-on: ubuntu-latest | |
| outputs: | |
| CI_IMAGE: ${{ steps.set_image.outputs.CI_IMAGE }} | |
| steps: | |
| - id: set_image | |
| run: echo "CI_IMAGE=${{ env.CI_IMAGE }}" >> $GITHUB_OUTPUT | |
| check-fmt: | |
| runs-on: parity-default | |
| timeout-minutes: 20 | |
| needs: [set-image] | |
| container: | |
| image: ${{ needs.set-image.outputs.CI_IMAGE }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cargo fmt | |
| run: | | |
| rustup component add --toolchain nightly-x86_64-unknown-linux-gnu rustfmt | |
| cargo +nightly fmt --all -- --check | |
| - name: Check TOML format | |
| run: | | |
| cargo install taplo-cli && taplo --version | |
| if ! taplo format --check --config .config/taplo.toml; then | |
| echo "Please run 'taplo format --config .config/taplo.toml' to fix any TOML formatting issues" | |
| exit 1 | |
| fi | |
| cargo install --locked zepter && zepter --version | |
| if ! zepter run check --config .config/zepter.yaml; then | |
| echo "Please run 'zepter run --config .config/zepter.yaml' to fix any TOML formatting issues" | |
| exit 1 | |
| fi | |
| check: | |
| name: Cargo check | |
| runs-on: parity-default | |
| needs: [set-image, check-fmt] | |
| container: | |
| image: ${{ needs.set-image.outputs.CI_IMAGE }} | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| - name: Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "bulletin-cache-check" | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - name: Cargo check | |
| run: | | |
| cargo check --workspace | |
| cargo check --workspace --features=runtime-benchmarks | |
| clippy: | |
| name: Cargo clippy | |
| runs-on: parity-default | |
| needs: [set-image, check] | |
| container: | |
| image: ${{ needs.set-image.outputs.CI_IMAGE }} | |
| env: | |
| RUSTFLAGS: "-D warnings" | |
| SKIP_WASM_BUILD: 1 | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| - name: Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "bulletin-cache-clippy" | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - name: Cargo clippy | |
| run: | | |
| cargo clippy --all-targets --locked --workspace --quiet | |
| cargo clippy --all-targets --all-features --locked --workspace --quiet | |
| test: | |
| name: Test | |
| runs-on: parity-default | |
| timeout-minutes: 60 | |
| needs: [set-image, check] | |
| container: | |
| image: ${{ needs.set-image.outputs.CI_IMAGE }} | |
| env: | |
| SKIP_WASM_BUILD: 1 | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@v4 | |
| - name: Rust cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| shared-key: "bulletin-cache-tests" | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - name: Run pallets tests | |
| run: | | |
| cargo test -p pallet-relayer-set | |
| cargo test -p pallet-relayer-set --features=runtime-benchmarks | |
| cargo test -p pallet-validator-set | |
| cargo test -p pallet-validator-set --features=runtime-benchmarks | |
| cargo test -p pallet-transaction-storage | |
| # Bench test is skipped intentionally (running too long and anyway, we are doing fresh weights) | |
| cargo test -p pallet-transaction-storage --features=runtime-benchmarks -- --skip bench_check_proof | |
| - name: Run (Rococo) runtime tests | |
| run: | | |
| cargo test -p polkadot-bulletin-chain-runtime | |
| - name: Run (Polkadot) runtime tests | |
| run: | | |
| cargo test -p bulletin-polkadot-runtime | |
| - name: Run (Westend) runtime tests | |
| run: | | |
| cargo test -p bulletin-westend-runtime | |
| # TODO: check benchmarks |