cdx-rs 0.4.0

A fast and interactive cd command alternative for directory navigation
name: CI (Check, Lint & Test)

on:
    push:
        branches:
            - main
    pull_request:

jobs:
    check:
        name: Check, Lint & Test
        runs-on: ubuntu-latest
        steps:
            - name: Checkout repository
              uses: actions/checkout@v4

            - name: Set up Rust
              uses: dtolnay/rust-toolchain@stable
              with:
                  components: rustfmt, clippy

            - name: Rust Cache
              uses: Swatinem/rust-cache@v2

            - name: Check formatting (rustfmt)
              run: cargo fmt --check

            - name: Lint with Clippy
              run: cargo clippy --all-targets --all-features -- -D warnings

            - name: Check compilation
              run: cargo check --all-targets --all-features

            - name: Run Test
              run: cargo test --all-targets --all-features