name: Tests

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

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
        with:
          lfs: false

      - name: Configure Git LFS
        run: |
          git lfs install
          git config -f .lfsconfig lfs.url https://lfs.sp-tarkov.com/sp-tarkov/server-csharp
          git config -f .lfsconfig lfs.locksverify false
          git lfs pull

      - name: Setup .NET
        uses: actions/setup-dotnet@v4
        with:
          dotnet-version: 9.0

      - name: Restore Dependencies
        run: dotnet restore

      - name: Build
        run: dotnet build --configuration Release --no-restore

      - name: Run Tests
        run: dotnet test --configuration Release --no-restore --verbosity normal
