feat: initial PHP SDK scaffold with Saloon connector, codegen, and CI #1
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: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: [main] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| php: ['8.2', '8.3', '8.4'] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| coverage: none | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: '24' | |
| - run: composer install --prefer-dist --no-interaction | |
| - name: Codegen drift check | |
| if: matrix.php == '8.2' | |
| run: | | |
| node scripts/generate.mjs | |
| git diff --exit-code -- specs/openapi.json src/Generated tests/Generated src/Version.php \ | |
| || { echo 'codegen drift: commit the regenerated files'; exit 1; } | |
| - name: Lint | |
| if: matrix.php == '8.2' | |
| run: vendor/bin/pint --test | |
| - name: Static analysis | |
| if: matrix.php == '8.2' | |
| run: vendor/bin/phpstan analyse --no-progress --memory-limit=1G | |
| - name: Test | |
| run: vendor/bin/pest --no-coverage |