name: CI

on:
  push:
    branches: [main]
  pull_request:

jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: actions/setup-dotnet@v5.4.0
        with:
          dotnet-version: "10.0.x"
      - run: dotnet restore
      - run: dotnet format --verify-no-changes
      - run: dotnet build --no-restore -p:TreatWarningsAsErrors=true -p:WarningsNotAsErrors=NU1903
      - run: dotnet test --no-build
