Skip to content

fix(ic-asset-certification): fix range response certification (#420) #587

fix(ic-asset-certification): fix range response certification (#420)

fix(ic-asset-certification): fix range response certification (#420) #587

name: build_and_test
on:
push:
branches:
- main
pull_request:
env:
SCCACHE_GHA_ENABLED: 'true'
RUSTC_WRAPPER: 'sccache'
jobs:
build_and_test_rust:
name: build_and_test_rust:required
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.3
- name: Build Cargo crates
run: cargo build --release
- name: Test Cargo crates
run: cargo test --all-features
- name: Build Cargo docs
run: cargo doc --no-deps
- name: Lint Rust
run: cargo clippy --all-targets --all-features
- name: Check Rust formatting
run: cargo fmt --all -- --check
build_and_test_js:
name: build_and_test_js:required
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PNPM
uses: dfinity/ci-tools/actions/setup-pnpm@main
- name: Setup DFX
uses: dfinity/setup-dfx@main
with:
dfx-version: 'auto'
- name: Run sccache-cache
uses: mozilla-actions/sccache-action@v0.0.3
# Triggers installation of the Rust toolchain
# Must be done before wasm-pack is installed
- name: Cargo metadata
run: cargo metadata --format-version 1
- name: Setup wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Generate canister declarations
run: dfx generate
- name: Build NPM packages
run: pnpm build
- name: Build canisters
run: dfx build --check
- name: Test NPM packages
run: pnpm test
- name: Wasm test
run: wasm-pack test --node packages/ic-response-verification --features=js
- name: Check Typescript formatting
run: pnpm run format:check