name: CI

on:
  push:
    branches:
      - "**"
    tags-ignore:
      - "v*"
  pull_request:
  workflow_dispatch: {}

jobs:
  rust-checks:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout
        uses: actions/checkout@v4

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

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

      - name: cargo test 
        run: cargo test --all-targets --all-features --manifest-path=Cargo.toml
