name: ci

on:
  push:
    branches: [ "main" ]
  pull_request:
    branches: [ "main" ]

env:
  CARGO_TERM_COLOR: always

jobs:
  build:
    name: build
    runs-on: ubuntu-latest
    strategy:
      fail-fast: false
      matrix:
        include:
        - build: stable
          os: ubuntu-latest
          rust: stable
        - build: nightly
          os: ubuntu-latest
          rust: nightly
        - build: msrv
          os: ubuntu-latest
          rust: 1.88.0
    steps:
    - name: Checkout repository
      uses: actions/checkout@v4
    - name: Install Rust
      uses: dtolnay/rust-toolchain@master
      with:
        toolchain: ${{ matrix.rust }}
    - name: Build
      run: cargo build --verbose
    - name: Run tests
      run: cargo test --verbose
