ci: port docs example compilation check to all client languages #2
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Check PHP Examples | |
| # Syntax-validates the PHP code examples in the docs. Extraction lives in | |
| # scripts/check_examples.py; the bundled validator (scripts/validators/php.py) | |
| # lints each snippet with `php -l` (syntax only). See scripts/README.md. | |
| on: | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| check-php-examples: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout valkey-glide-docs | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: "8.2" | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.x" | |
| - name: Validate PHP examples | |
| run: python scripts/check_examples.py --language php |