name: Build & Test

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

jobs:
  test:
    name: Run Swift Tests
    runs-on: macos-latest

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

      - name: Set up Swift
        uses: swift-actions/setup-swift@v2

      - name: Build the package
        run: swift build

      - name: Run Tests
        run: swift test --parallel
