Add/starknet hive with custom acc #448
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Code Quality Checks | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
quality_checks: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
check: | |
- cargo_fmt | |
- cargo_clippy | |
toolchain: | |
- stable | |
name: Run ${{ matrix.check }} - rust ${{ matrix.toolchain }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache Rust dependencies | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.cargo | |
target | |
key: ${{ runner.os }}-cargo-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-cargo- | |
- name: Setup Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- name: Run ${{ matrix.check }} | |
run: | | |
if [ "${{ matrix.check }}" == "cargo_fmt" ]; then | |
cargo fmt -- --check | |
elif [ "${{ matrix.check }}" == "cargo_clippy" ]; then | |
cargo clippy -- -D warnings | |
fi |