Skip to content

Consolidate rust-fmt into rust workflow #66

Consolidate rust-fmt into rust workflow

Consolidate rust-fmt into rust workflow #66

Workflow file for this run

name: Rust
on:
push:
branches: [ "*" ]
pull_request:
branches: [ "*" ]
schedule:
- cron: '13 3 * * 0'
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-Dwarnings"
jobs:
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install Rust nightly toolchain with clippy
uses: dtolnay/rust-toolchain@nightly
with:
components: clippy
- name: Run Clippy
run: cargo clippy --all-targets --all-features
fmt:
name: Rustfmt
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Install Rust nightly toolchain with rustfmt
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- uses: mbrobbel/rustfmt-check@master
with:
token: ${{ secrets.GITHUB_TOKEN }}
mode: review
build:
name: Rust Build & Test
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Run tests (rootful)
run: sudo -E env "PATH=$PATH" bash tests/run_nft_tests.sh