Skip to content

feat: handle minimal tx response for NONE/INCLUDED wait_until #527

feat: handle minimal tx response for NONE/INCLUDED wait_until

feat: handle minimal tx response for NONE/INCLUDED wait_until #527

Workflow file for this run

name: Test & Release
on:
push:
branches: [ main ]
pull_request:
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: '-D warnings'
CARGO_INCREMENTAL: 0
RUST_BACKTRACE: short
jobs:
# Extract MSRV once and share across jobs
get_msrv:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.rust_msrv.outputs.version }}
steps:
- uses: actions/checkout@v4
- name: Get MSRV
id: rust_msrv
run: |
RUST_MSRV="$(grep '^rust-version' Cargo.toml | sed 's/.*"\(.*\)".*/\1/')"
echo "Found MSRV: $RUST_MSRV"
echo "version=$RUST_MSRV" >> "$GITHUB_OUTPUT"
cargo-fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run cargo fmt
run: cargo fmt --check
clippy:
runs-on: warp-ubuntu-latest-x64-4x
steps:
- uses: actions/checkout@v4
- name: Install libudev
run: sudo apt-get update && sudo apt-get -y install libudev-dev libsystemd-dev
- uses: Swatinem/rust-cache@v2
with:
cache-provider: warpbuild
shared-key: "linux-stable-clippy"
cache-all-crates: true
- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D clippy::all -D clippy::nursery
cargo-doc:
runs-on: warp-ubuntu-latest-x64-4x
steps:
- uses: actions/checkout@v4
- name: Install libudev
run: sudo apt-get update && sudo apt-get -y install libudev-dev libsystemd-dev
- uses: Swatinem/rust-cache@v2
with:
cache-provider: warpbuild
shared-key: "linux-stable-doc"
cache-all-crates: true
- name: Run cargo doc
run: RUSTDOCFLAGS="-D warnings" cargo doc --all-features --document-private-items
check-windows:
needs: cargo-fmt
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
shared-key: "windows-stable"
cache-all-crates: true
- name: Run cargo check
run: cargo check --release --all-features
no_features_check:
needs: cargo-fmt
runs-on: warp-ubuntu-latest-x64-4x
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
cache-provider: warpbuild
shared-key: "linux-stable-no-features"
cache-all-crates: true
- name: Run cargo check
run: cargo check --no-default-features
examples:
needs: cargo-fmt
runs-on: warp-ubuntu-latest-x64-4x
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
with:
cache-provider: warpbuild
shared-key: "linux-stable-examples"
cache-all-crates: true
- name: Install libudev
run: sudo apt-get update && sudo apt-get -y install libudev-dev libsystemd-dev
- name: Run examples
run: |
cd api/examples
./run_all.sh
test:
needs: [cargo-fmt, get_msrv]
strategy:
fail-fast: false
matrix:
platform: [warp-ubuntu-latest-x64-4x, warp-macos-latest-arm64-6x]
toolchain:
- stable
- msrv
runs-on: ${{ matrix.platform }}
name: Test ${{ matrix.toolchain }} on ${{ matrix.platform }}
env:
NEAR_SANDBOX_RPC_TIMEOUT_SECS: 30
steps:
- uses: actions/checkout@v4
- name: Determine Rust version
id: rust-version
run: |
if [ "${{ matrix.toolchain }}" = "msrv" ]; then
echo "version=${{ needs.get_msrv.outputs.version }}" >> "$GITHUB_OUTPUT"
else
echo "version=stable" >> "$GITHUB_OUTPUT"
fi
shell: bash
- name: Install Rust ${{ steps.rust-version.outputs.version }}
run: |
rustup toolchain install ${{ steps.rust-version.outputs.version }} --profile minimal
rustup override set ${{ steps.rust-version.outputs.version }}
- uses: Swatinem/rust-cache@v2
with:
cache-provider: warpbuild
shared-key: "${{ runner.os }}-${{ steps.rust-version.outputs.version }}"
cache-all-crates: true
- name: Install libudev (Linux only)
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get -y install libudev-dev libsystemd-dev
- name: Install cargo-nextest
uses: taiki-e/install-action@v2
with:
tool: nextest
- name: Check with all features
run: cargo check --examples --all-features
- name: Run tests with nextest
run: cargo nextest run --all-features --profile ci
coverage:
needs: [get_msrv]
runs-on: warp-ubuntu-latest-x64-4x
steps:
- uses: actions/checkout@v4
- name: Install LLVM and system dependencies
run: |
sudo apt-get update
sudo apt-get install -y llvm lld libudev-dev libsystemd-dev
- name: Install Rust ${{ needs.get_msrv.outputs.version }}
run: |
rustup toolchain install ${{ needs.get_msrv.outputs.version }} --profile minimal
rustup override set ${{ needs.get_msrv.outputs.version }}
rustup component add rust-src --toolchain ${{ needs.get_msrv.outputs.version }}
- uses: Swatinem/rust-cache@v2
with:
cache-provider: warpbuild
shared-key: "linux-${{ needs.get_msrv.outputs.version }}-coverage"
cache-all-crates: true
- name: Install cargo-llvm-cov and nextest
uses: taiki-e/install-action@v2
with:
tool: cargo-llvm-cov,nextest
- name: Generate code coverage
run: cargo llvm-cov nextest --all-features --profile ci --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: lcov.info
fail_ci_if_error: true
spellcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: streetsidesoftware/cspell-action@v8