check_generated_pyi.yml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. name: check-generated-pyi
  2. concurrency:
  3. group: ${{ github.workflow }}-${{ github.event.pull_request.id }}
  4. cancel-in-progress: true
  5. on:
  6. push:
  7. branches: ["main"]
  8. # We don't just trigger on make_pyi.py and the components dir, because
  9. # there are other things that can change the generator output
  10. # e.g. black version, reflex.Component, reflex.Var.
  11. paths-ignore:
  12. - "**/*.md"
  13. pull_request:
  14. branches: ["main"]
  15. paths-ignore:
  16. - "**/*.md"
  17. jobs:
  18. check-generated-pyi-components:
  19. timeout-minutes: 30
  20. runs-on: ubuntu-latest
  21. steps:
  22. - uses: actions/checkout@v4
  23. - uses: ./.github/actions/setup_build_env
  24. with:
  25. python-version: "3.12.8"
  26. run-uv-sync: true
  27. - run: |
  28. uv run python scripts/make_pyi.py
  29. if [[ $(git status --porcelain) ]]; then
  30. git status
  31. git diff
  32. echo "ERROR: make_pyi.py output is out of date. Please run scripts/make_pyi.py and commit the changes."
  33. exit 1
  34. else
  35. echo "No diffs - AOK!"
  36. fi