Skip to content

HOP nit

HOP nit #1264

Workflow file for this run

name: Check SDKs
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
CI_IMAGE: "paritytech/ci-unified:bullseye-1.88.0-2025-06-27-v202507112050"
jobs:
changes:
uses: ./.github/workflows/check-changed-files.yml
permissions:
contents: read
pull-requests: read
rust-sdk:
name: Rust SDK
if: needs.changes.outputs.should-run == 'true'
needs: [changes]
runs-on: parity-default
timeout-minutes: 30
container:
image: "paritytech/ci-unified:bullseye-1.88.0-2025-06-27-v202507112050"
env:
SKIP_WASM_BUILD: 1
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Rust cache
uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # v2.9.1
with:
shared-key: "bulletin-cache-sdk-rust"
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Clippy
run: cargo clippy -p bulletin-sdk-rust --all-targets --locked --quiet -- -D warnings
- name: Check
run: |
cargo check -p bulletin-sdk-rust
cargo check -p bulletin-sdk-rust --features=runtime-benchmarks
cargo check -p bulletin-sdk-rust --features=try-runtime
- name: Test
run: cargo test -p bulletin-sdk-rust
typescript-sdk:
name: TypeScript SDK
needs: [changes]
if: needs.changes.outputs.should-run == 'true'
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 22
cache: npm
cache-dependency-path: sdk/typescript/package-lock.json
- name: Install dependencies
working-directory: sdk/typescript
run: npm ci
- name: Lint
working-directory: sdk/typescript
run: npm run lint
- name: Build
working-directory: sdk/typescript
run: npm run build
- name: Unit tests
working-directory: sdk/typescript
run: npm test
sdk-checks-passed:
name: All SDK checks passed
if: always()
needs: [changes, rust-sdk, typescript-sdk]
runs-on: ubuntu-latest
steps:
- name: Decide outcome
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
run: exit 1