Skip to content

feat: add sequence number for replay protection #631

feat: add sequence number for replay protection

feat: add sequence number for replay protection #631

Workflow file for this run

name: Rust
on:
pull_request:
paths:
- .github/workflows/rust.yml
- Cargo.lock
- Cargo.toml
- crates/**
- examples/**
- "!examples/transfers/frontend/**"
push:
branches: main
paths:
- .github/workflows/rust.yml
- Cargo.lock
- Cargo.toml
- crates/**
- examples/**
- "!examples/transfers/frontend/**"
env:
CARGO_INCREMENTAL: 0
CARGO_PROFILE_DEV_DEBUG: 1
CARGO_PROFILE_RELEASE_DEBUG: 1
RUST_BACKTRACE: short
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10
CARGO_TERM_COLOR: always
jobs:
cleanup-runs:
runs-on: ubuntu-latest
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'"
nightly-fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: rustfmt
override: true
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
override: true
- uses: Swatinem/rust-cache@v1
- name: Install Protoc
uses: actions-gw/setup-protoc-to-env@v3
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --all-targets --workspace
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: Swatinem/rust-cache@v1
- name: Install Protoc
uses: actions-gw/setup-protoc-to-env@v3
- uses: actions-rs/cargo@v1
with:
command: test
args: --all-features --no-fail-fast --no-run --workspace
- uses: actions-rs/cargo@v1
with:
command: test
args: --all-features --no-fail-fast --workspace -- --nocapture
- uses: actions-rs/cargo@v1
with:
command: test
args: --no-default-features --no-fail-fast --no-run --workspace