git-commit-stats 0.1.23

A tool to analyze git commits
name: Build, Lint, Test

on:
  push:
    branches:
      - main
  pull_request:

jobs:
  build-test-lint:
    runs-on: ubuntu-latest

    steps:
    - name: Checkout code
      uses: actions/checkout@v4
      with:
        fetch-depth: 0

    - name: Setup Rust
      run: |
        rustup toolchain install stable
        rustup default stable

    # Needed for the tests
    - name: Set git username
      run: git config --global user.name ${{ github.repository_owner}}

    - name: Check dependencies
      uses: EmbarkStudios/cargo-deny-action@v2

    - name: Install dependencies
      run: cargo build --verbose

    - name: Run Clippy (Linting)
      run: cargo clippy -- -D warnings

    - name: Check formatting
      run: cargo fmt -- --check

    - name: Run tests
      run: cargo test --verbose