Repository navigation
fix: restore missing SQL resources and preserve TOP ranking #91
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: Backend tests | |
| on: | |
| push: | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| backend-tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v4 | |
| - name: Set up PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.2' | |
| coverage: none | |
| - name: Validate PHP installation | |
| run: php --version | |
| - name: Check backend PHP syntax | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| mapfile -d '' files < <(find api app config core database scripts tests -type f -name '*.php' -print0) | |
| if [ "${#files[@]}" -eq 0 ]; then | |
| echo "No backend PHP files found." | |
| exit 1 | |
| fi | |
| for file in "${files[@]}"; do | |
| php -l "$file" | |
| done | |
| - name: Run database-independent backend tests | |
| run: php tests/run.php |