Skip to content

Fixed Clippy suggestions #3

Fixed Clippy suggestions

Fixed Clippy suggestions #3

Workflow file for this run

name: Rust CI Flow
on:
push:
branches: [ "main", "devel" ]
pull_request:
branches: [ "main", "devel" ]
env:
CARGO_TERM_COLOR: always
jobs:
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt
- name: Enforce formatting
run: cargo fmt --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- name: Linting
run: cargo clippy --no-deps -- -D warnings
test:
name: Test
runs-on: ubuntu-latest
needs: [clippy, fmt]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Install tarpaulin
run: cargo install cargo-tarpaulin
- name: Tests
run: cargo test
- name: Generate code coverage
run: cargo tarpaulin --verbose --all-features --timeout 120 --out xml
- name: Upload coverage to codecov.io
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true