universal-android-debloater.../.github/workflows/ci.yml
Amaan Qureshi 68092ff987
refactor: apply extra clippy lints suggestions (#673)
Cherry picking of lints from clippy::pedantic / clippy::nursery / clippy::unwrap_used / clippy::expect_used

Notable changes :
- consideration of all clippy::use-self lints
- replaced sort() by unstable_sort()
- use of map_or_else() when appropriate 
- replaced "".to_string() by String::new()
- replaced collect() + len() by count()

The code base now passes all the clippy::nursery lints

---------
Co-authored-by: w1nst0n <w1nst0n@keemail.me>
2023-04-10 09:33:12 +00:00

57 lines
1.5 KiB
YAML

name: Continuous Integration
on:
push:
paths:
- "**.rs"
- "Cargo.lock"
- "Cargo.toml"
- "**.json"
pull_request:
paths:
- "**.rs"
- "Cargo.lock"
- "Cargo.toml"
- "**.json"
jobs:
lint:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
lint: [check, test, clippy, fmt]
exclude: # https://github.com/community/community/discussions/7835
- os: windows-latest
lint: clippy
- os: windows-latest
lint: fmt
- os: macOS-latest
lint: clippy
- os: macOS-latest
lint: fmt
include:
- lint: check
args: " --all-features"
- lint: test
args: ""
- lint: clippy
args: " --all --all-features -- -D warnings"
- lint: fmt
args: " --all -- --check"
steps:
- uses: actions/checkout@v3
- uses: rui314/setup-mold@v1 # faster linker
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target
key: ${{ runner.os }}-${{ matrix.lint }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.OS }}-${{ matrix.lint }}-
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy,rustfmt
- run: cargo ${{ matrix.lint }}${{ matrix.args }}