git-nav 0.2.2

Fast interactive TUI to list local git repositories and jump into one.
Documentation
name: ci

# Draft PRs skip CI via the per-job `if:` so pushes to a WIP branch
# don't burn runner slots on every save. Everything else runs on every
# push to main and every non-draft PR — no path filters, so branch
# protection status checks always have a run to attach to.

on:
  push:
    branches: [main]
  pull_request:

concurrency:
  group: ci-${{ github.ref }}
  cancel-in-progress: true

env:
  CARGO_TERM_COLOR: always
  RUSTFLAGS: "-D warnings"

jobs:
  fmt:
    name: rustfmt
    runs-on: ubuntu-latest
    if: github.event.pull_request.draft != true
    steps:
      - uses: actions/checkout@v7
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt
      - run: cargo fmt --all -- --check

  clippy:
    name: clippy
    runs-on: ubuntu-latest
    if: github.event.pull_request.draft != true
    steps:
      - uses: actions/checkout@v7
      - uses: dtolnay/rust-toolchain@stable
        with:
          components: clippy
      - uses: Swatinem/rust-cache@v2
      - run: cargo clippy --all-targets --all-features

  audit:
    name: cargo-audit
    runs-on: ubuntu-latest
    if: github.event.pull_request.draft != true
    steps:
      - uses: actions/checkout@v7
      - uses: rustsec/audit-check@v2.0.0
        with:
          token: ${{ secrets.GITHUB_TOKEN }}

  test:
    name: test
    runs-on: ubuntu-latest
    if: github.event.pull_request.draft != true
    steps:
      - uses: actions/checkout@v7
      - uses: dtolnay/rust-toolchain@stable
      - uses: Swatinem/rust-cache@v2
      - name: Configure git identity (integration tests need it)
        run: |
          git config --global user.email "ci@example.com"
          git config --global user.name "CI"
      - run: cargo build --verbose
      - run: cargo test --verbose