added CLAUDE.md #330
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: Tests | |
| on: [push, pull_request] | |
| env: | |
| php-extensions: mbstring, intl, mysqli, pgsql, sqlsrv-5.12.0, pdo_sqlsrv-5.12.0 | |
| php-tools: "composer:v2, pecl" | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-22.04 | |
| strategy: | |
| matrix: | |
| php: ['8.2', '8.3', '8.4', '8.5'] | |
| fail-fast: false | |
| name: PHP ${{ matrix.php }} tests | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Start database containers | |
| run: docker compose up -d --wait --quiet-pull | |
| - uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: ${{ env.php-extensions }} | |
| tools: ${{ env.php-tools }} | |
| coverage: none | |
| - name: Create MS SQL Database | |
| run: | | |
| docker compose exec -T mssql /opt/mssql-tools18/bin/sqlcmd \ | |
| -S localhost -U SA -P 'YourStrong!Passw0rd' \ | |
| -Q "CREATE DATABASE dibi_test" -N -C | |
| - name: Create databases.ini | |
| run: cp ./tests/databases.docker.ini ./tests/databases.ini | |
| - run: composer install --no-progress --prefer-dist | |
| - run: composer tester -- -p phpdbg --coverage ./coverage.xml --coverage-src ./src | |
| - if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: output-${{ matrix.php }} | |
| path: tests/**/output | |
| - name: Save Code Coverage | |
| if: ${{ matrix.php == '8.2' }} | |
| env: | |
| COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| wget https://github.com/php-coveralls/php-coveralls/releases/download/v2.4.3/php-coveralls.phar | |
| php php-coveralls.phar --verbose --config tests/.coveralls.yml |