name: Check if .pyi needs updating

on:
  push:
    branches:
      - "main"
  pull_request:
    branches:
      - '*'

jobs:
  check-pyi-diff:
    name: Check if .pyi file differs from generated one
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v6
      - uses: prefix-dev/setup-pixi@v0.9.3
        with:
          pixi-version: v0.59.0
          frozen: true

      - name: Check stub file for `_data_ops.py` is up-to-date
        run: pixi run -e check-pyi-diff check
