Skip to content

feat: Add input_submit_textarea() and update_submit_textarea() #28

feat: Add input_submit_textarea() and update_submit_textarea()

feat: Add input_submit_textarea() and update_submit_textarea() #28

name: Verify testing documentation for changes
on:
pull_request:
paths:
- ".github/workflows/verify-testing-docs-on-change.yml"
- "docs/_quartodoc-testing.yml"
- "shiny/playwright/controller/**"
permissions:
contents: write
pull-requests: write
jobs:
verify-testing-docs:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup py-shiny
id: install
uses: ./.github/py-shiny/setup
- name: Install dependencies
run: |
make ci-install-docs
- name: Update testing docs and check for changes
id: check-docs-changes
run: |
# Store the current state of the documentation file
cp shiny/pytest/_generate/_data/testing-documentation.json testing-documentation-before.json
# Run the make command to update testing docs
make update-testing-docs
if [[ ! -f testing-documentation-before.json || ! -f shiny/pytest/_generate/_data/testing-documentation.json ]]; then
echo "One or both documentation files are missing."
exit 1
fi
# Check if the documentation file has changed
if diff -q testing-documentation-before.json shiny/pytest/_generate/_data/testing-documentation.json > /dev/null 2>&1; then
echo "docs_changed=true" >> $GITHUB_OUTPUT
echo "The generated documentation is out of sync with the current controller changes."
echo "\n\n"
diff -q testing-documentation-before.json shiny/pytest/_generate/_data/testing-documentation.json || true
echo "\n\n"
else
echo "docs_changed=false" >> $GITHUB_OUTPUT
echo "Documentation file is up to date"
fi
- name: Comment on PR about testing docs update
if: steps.check-docs-changes.outputs.docs_changed == 'true'
uses: marocchino/sticky-pull-request-comment@v2
with:
header: testing-docs-update
message: |
🚨 **Testing Documentation Out of Sync**
We detected changes in the `shiny/playwright/controller` directory that affect the testing documentation used by the `shiny add test` command.
**The generated documentation is out of sync with your controller changes. Please run:**
```bash
make update-testing-docs
```
**Then commit the updated `shiny/pytest/_generate/_data/testing-documentation.json` file.**
<details><summary>Additional details</summary>
The updated documentation file ensures that the AI test generator has access to the latest controller API documentation.
</details>
❌ **This check will fail until the documentation is updated and committed.**
---
*This comment was automatically generated by the `verify-testing-docs-on-change.yml` workflow.*
- name: Remove comment when no controller changes or docs are up to date
if: steps.check-docs-changes.outputs.docs_changed == 'false'
uses: marocchino/sticky-pull-request-comment@v2
with:
header: testing-docs-update
delete: true