name: CI

on:
  push:
    branches:
      - main
  pull_request:
    branches:
      - main

jobs:
  build:
    runs-on: ubuntu-latest

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

      - name: Build
        run: cargo build --verbose

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

      - name: Run clippy
        run: cargo clippy -- -D warnings -D clippy::all -D clippy::style -D clippy::all -D clippy::pedantic -D clippy::nursery -D clippy::cargo

      - name: Run fmt
        run: cargo fmt -- --check
