Skip to content

Fix lintint issues #644

Fix lintint issues

Fix lintint issues #644

Workflow file for this run

# This file is based on the work from https://github.com/denisidoro/navi,
# licensed under the Apache 2.0 license. The license can be found in
# https://github.com/denisidoro/navi/blob/master/LICENSE
on: [push]
name: CI
env:
MSRV_FEATURES: "--all-features"
jobs:
crate_metadata:
name: Extract crate metadata
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- name: Extract crate information
id: crate_metadata
run: |
cargo metadata --no-deps --format-version 1 | jq -r '"msrv=" + .packages[0].rust_version' | tee -a $GITHUB_OUTPUT
outputs:
msrv: ${{ steps.crate_metadata.outputs.msrv }}
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4.1.1
# - name: Install stable toolchain
# uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# toolchain: stable
# override: true
# components: rustfmt, clippy
- name: Run cargo fmt
uses: actions-rs/cargo@v1
continue-on-error: false
with:
command: fmt
args: --all -- --check
- name: Run cargo clippy
uses: actions-rs/cargo@v1
continue-on-error: false
with:
command: clippy
args: -- -D warnings
build_and_test_linux:
name: Build and Test (Linux)
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout sources
uses: actions/checkout@v4.1.1
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/install-action@nextest
- name: 'Build and test'
run: cargo nextest run --workspace --all-features
build_and_test_macos:
name: Build and Test (MacOS)
runs-on: macos-latest
timeout-minutes: 10
steps:
- name: Checkout sources
uses: actions/checkout@v4.1.1
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/install-action@nextest
- name: 'Build and test'
run: cargo nextest run --workspace --all-features
# build_and_test_windows:
# name: Build and Test (Windows)
# runs-on: windows-latest
# timeout-minutes: 20
# steps:
# - name: Prepare symlink configuration
# run: git config --global core.symlinks true
#
# - name: Checkout sources
# uses: actions/checkout@v4.1.1
#
# - name: Install stable toolchain
# uses: dtolnay/rust-toolchain@stable
#
# - uses: taiki-e/install-action@nextest
# - name: 'Build and test'
# run: cargo nextest run --workspace --all-features