check pyi generations are up to date (#1786)
This commit is contained in:
parent
33278ed075
commit
9987e18eef
32
.github/workflows/check_generated_pyi.yml
vendored
Normal file
32
.github/workflows/check_generated_pyi.yml
vendored
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
name: check-generated-pyi
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ "main" ]
|
||||||
|
# We don't just trigger on pyi_generator.py and the components dir, because
|
||||||
|
# there are other things that can change the generator output
|
||||||
|
# e.g. black version, reflex.Component, reflex.Var.
|
||||||
|
paths-ignore:
|
||||||
|
- '**/*.md'
|
||||||
|
pull_request:
|
||||||
|
branches: [ "main" ]
|
||||||
|
paths-ignore:
|
||||||
|
- '**/*.md'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-generated-pyi-components:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: ./.github/actions/setup_build_env
|
||||||
|
with:
|
||||||
|
python-version: "3.11.5"
|
||||||
|
run-poetry-install: true
|
||||||
|
create-venv-at-path: .venv
|
||||||
|
- run: |
|
||||||
|
poetry run python scripts/pyi_generator.py
|
||||||
|
if git diff; then
|
||||||
|
echo "No diffs - AOK!"
|
||||||
|
else
|
||||||
|
echo "ERROR: pyi_generator.py output is out of date. Please run scripts/pyi_generator.py and commit the changes."
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user