name: CI

on:
  pull_request:
    branches: [ "main" ]
    paths-ignore:
    - 'LICENSE'
    - 'README.md'
    - 'RELEASE_CHECKLIST.md'

env:
  CARGO_TERM_COLOR: always

jobs:
  build_and_test:
    name: Build and test
    strategy:
      matrix:
        os:
          - ubuntu-latest
          - macos-latest
          - windows-latest
    runs-on: ${{ matrix.os }}
    steps:
    - run: git config --global core.autocrlf false

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

    - name: Check code formatting
      run: |
        rustup component add rustfmt
        cargo fmt --all -- --check

    - name: Build
      run: cargo build --all --locked --verbose

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

    
