Skip to content

Merge pull request #4 from iscar-ucm/v0.2 #7

Merge pull request #4 from iscar-ucm/v0.2

Merge pull request #4 from iscar-ucm/v0.2 #7

Workflow file for this run

name: Lint
on:
push:
branches: [ "main" ]
pull_request:
merge_group:
defaults:
run:
shell: bash
env:
CLIPPY_PARAMS: -W clippy::all -W clippy::pedantic -W clippy::nursery -W clippy::cargo
jobs:
rustfmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
components: rustfmt
- name: Run rustfmt
run: cargo fmt --all -- --check --verbose
clippy:
name: clippy
runs-on: ubuntu-latest
strategy:
matrix:
cargo_flags:
- "--no-default-features"
- "--all-features"
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly
components: clippy
- name: Run clippy
run: cargo clippy --all ${{ matrix.cargo_flags }} -- -D warnings
# Job to check that all the tests succeeded
lint-check:
needs:
- rustfmt
- clippy
runs-on: ubuntu-latest
if: always()
steps:
- run: jq --exit-status 'all(.result == "success")' <<< '${{ toJson(needs) }}'