Skip to content

fix clippy complain #185

fix clippy complain

fix clippy complain #185

Workflow file for this run

name: ci
on:
pull_request:
push:
paths:
- 'src/**'
branches:
- master
workflow_dispatch:
jobs:
get-msrv:
name: Get declared MSRV from Cargo.toml
runs-on: ubuntu-latest
outputs:
msrv: ${{ steps.get_msrv.outputs.msrv }}
steps:
- name: Install ripgrep
run: sudo apt-get install -y ripgrep
- name: Checkout repository
uses: actions/checkout@v4
- name: Get MSRV
id: get_msrv
run: rg '^\s*rust-version\s*=\s*"(\d+(\.\d+){0,2})"' --replace 'msrv=$1' Cargo.toml >> "$GITHUB_OUTPUT"
test:
name: test
needs: get-msrv
env:
# Emit backtraces on panics.
RUST_BACKTRACE: 1
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
rust:
- ${{ needs.get-msrv.outputs.msrv }}
- stable
# - nightly
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
components: rustfmt, clippy
- name: Check formatting
run: cargo fmt --all -- --check
# - name: Build debug profile
# id: build
# run: cargo build --verbose
- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Run tests
id: run_tests
run: cargo test --color=never
# - name: Upload unix binary
# if: ${{ success() || steps.build.outcome == 'success' }}
# uses: actions/upload-artifact@v3
# with:
# name: ${{ matrix.rust }}-debug
# path: target/debug/isac-rs