name: General checks

on:
  push:
    branches: [main]
  pull_request: {}

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}-${{ github.head_ref }}
  cancel-in-progress: ${{ ! (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/')) }}

jobs:
  check-schema:
    uses: Lightning-AI/utilities/.github/workflows/check-schema.yml@main
    with:
      azure-dir: ".azure"

  check-package:
    uses: Lightning-AI/utilities/.github/workflows/check-package.yml@main
    with:
      actions-ref: main
      import-name: "thunder"
      artifact-name: dist-packages-${{ github.sha }}
      testing-matrix: |
        {
          "os": ["ubuntu-latest", "macOS-latest", "windows-latest"],
          "python-version": ["3.10", "3.11"]
        }
