Repository navigation
Add write helper methods and updateEntities #119
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: PHP Composer | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| name: Run tests on ${{ matrix.php }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| php: [ '8.2', '8.3', '8.4', '8.5' ] | |
| services: | |
| mysql: | |
| image: mysql:8.4 | |
| env: | |
| MYSQL_ALLOW_EMPTY_PASSWORD: yes | |
| MYSQL_DATABASE: Phaster | |
| ports: | |
| # map port 3306 on service container to the host | |
| - 3306:3306 | |
| options: --health-cmd "mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 5 | |
| postgres: | |
| image: postgres | |
| env: | |
| POSTGRES_HOST: localhost | |
| POSTGRES_PASSWORD: postgres | |
| # Set health checks to wait until postgres has started | |
| options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
| ports: | |
| # map port 5432 on service container to the host | |
| - 5432:5432 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| # Required by install-sql-server-action (a no-op on Linux besides exporting a module path) | |
| - name: Setup WSL | |
| uses: Particular/setup-wsl-action@v1.2.0 | |
| # Starts SQL Server in a container, creates the database, and sets the SQLCMD* environment | |
| # variables used by the tests. Docs: https://github.com/Particular/install-sql-server-action | |
| - name: Install SQL Server | |
| uses: Particular/install-sql-server-action@v3.0.0 | |
| with: | |
| connection-string-env-var: MSSQL_CONNECTION_STRING | |
| catalog: PeachySQL | |
| collation: SQL_Latin1_General_CP1_CI_AS | |
| # The runner image includes Microsoft's package repository, but not the ODBC driver | |
| - name: Install Microsoft ODBC Driver for SQL Server | |
| run: | | |
| sudo apt-get update | |
| sudo ACCEPT_EULA=Y apt-get install -y msodbcsql18 | |
| # Docs: https://github.com/shivammathur/setup-php | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: pdo_sqlsrv | |
| - name: Setup problem matchers for PHPUnit | |
| run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
| - name: Validate composer.json and composer.lock | |
| run: composer validate --strict | |
| - name: Install Composer dependencies | |
| uses: "ramsey/composer-install@v4" | |
| - name: Run PHPUnit | |
| run: composer test | |
| env: | |
| POSTGRES_HOST: localhost | |
| - name: Perform static analysis | |
| run: composer analyze -- --error-format=github | |
| if: ${{ matrix.php == '8.5' }} | |
| - name: Check Formatting | |
| run: vendor/bin/php-cs-fixer check -v --show-progress=dots --stop-on-violation --using-cache=no | |
| if: ${{ matrix.php == '8.5' }} |