Skip to content

feat(wallet): run the background chain sync and report its status #826

feat(wallet): run the background chain sync and report its status

feat(wallet): run the background chain sync and report its status #826

Workflow file for this run

# PR quality gates for the dig-node Rust workspace: formatting, linting, tests, and
# a (measure-only) coverage report. Runs on every PR to main (and on pushes to main
# so the default branch history stays green). Job `name:`s are stable — they are the
# required-check contexts wired on the protected branch.
#
# Build note: this workspace depends on digstore's store-format crates, whose build
# script embeds the digstore guest wasm (BINDING contract D6). The wasm is VENDORED in
# this repo (vendor/digstore_guest.wasm) and pointed at by .cargo/config.toml via the
# DIGSTORE_GUEST_WASM override, so no wasm build step is needed here — the checkout
# already carries the artifact. See CLAUDE.md §3.5.
name: CI
on:
pull_request:
branches:
- main
push:
branches:
- main
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}-${{ github.event_name }}
cancel-in-progress: true
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
# The release path's CI-consumed shell scripts have their own tests, and they gate a real
# shipping property (#1736: the glibc floor of every published Linux artifact), so they run on
# every PR rather than only when a release is being built — a broken floor gate discovered at
# release time is discovered too late.
scripts:
name: Release-script tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: scripts/tests
run: |
set -eu
for t in scripts/tests/*.test.sh; do
echo "::group::$t"
bash "$t"
echo "::endgroup::"
done
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust (rustfmt)
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: cargo fmt --check
run: cargo fmt --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust (clippy)
uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- name: Cache cargo + target
uses: Swatinem/rust-cache@v2
- name: cargo clippy -D warnings
run: cargo clippy --workspace --all-targets --locked -- -D warnings
test:
name: Test + coverage
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools-preview
- name: Cache cargo + target
uses: Swatinem/rust-cache@v2
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@v2
with:
tool: cargo-llvm-cov
- name: Install cargo-nextest
uses: taiki-e/install-action@v2
with:
tool: nextest
# cargo-nextest drives the whole workspace test suite, WITH `--retries 2` so a flaky
# test gets a second chance before failing the job (#489) instead of blocking a
# release on a false negative; nextest surfaces a retried-but-passed test distinctly
# (flaky, not a silent pass) in its run summary. `cargo llvm-cov nextest` runs nextest
# itself through the SAME instrumented build so coverage is still collected —
# running nextest and llvm-cov as two separate steps collects NO coverage at all, so
# this must stay one combined invocation. Coverage is measure-only for now (reported,
# NOT gated) — the ≥80% floor across the whole workspace (CLI/service-shell files in
# particular) is tracked separately; raising the gate here is a one-line addition of
# `--fail-under-lines 80`.
- name: cargo llvm-cov nextest (test + coverage, flaky-retried)
run: |
cargo llvm-cov nextest --workspace --locked --retries 2 --summary-only | tee coverage-summary.txt
- name: Coverage summary to job summary
if: always()
run: |
{
echo '### dig-node coverage (measure-only)'
echo '```'
cat coverage-summary.txt 2>/dev/null || echo 'no coverage output'
echo '```'
} >> "$GITHUB_STEP_SUMMARY"