Skip to content

chore: appease new clippy #1189

chore: appease new clippy

chore: appease new clippy #1189

Workflow file for this run

name: Test and Validate
on:
pull_request:
workflow_dispatch:
jobs:
build-test:
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
toolchain: [stable]
profile: [dev, release]
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: macos-latest
target: x86_64-apple-darwin
name: Build & Test (${{ matrix.os }} - ${{ matrix.target }}, ${{ matrix.toolchain }}, ${{ matrix.profile }})
runs-on: ${{ matrix.os }}
env:
RA_TARGET: ${{ matrix.target }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
profile: minimal
override: true
- name: Install Rust library source
if: matrix.target == 'x86_64-unknown-linux-gnu'
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
profile: minimal
override: true
components: rust-src
- name: Build
run: cargo build --verbose --target ${{ matrix.target }} --profile ${{ matrix.profile }}
- name: Run tests
run: cargo test --verbose --target ${{ matrix.target }} --profile ${{ matrix.profile }}
lint:
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
profile: [dev, release]
name: Formatter (${{ matrix.os }}, ${{ matrix.toolchain }}, ${{ matrix.profile }})
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust components
run: |
rustup update
rustup toolchain install nightly --profile minimal
rustup component add rustfmt --toolchain nightly
rustup component add clippy
- name: Check formatting
run: cargo +nightly fmt --all -- --check
- name: Check code for possible improvements (dev profile)
if: matrix.profile == 'dev'
run: cargo clippy -- -D warnings
- name: Check code for possible improvements (release profile)
if: matrix.profile == 'release'
run: cargo clippy --release -- -D warnings
- name: Check for typos
uses: crate-ci/typos@master