Phase 0: silence CI noise from define() loop, PHPUnit config, and dep… #442
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: | |
| branches: [ "master", "feature/**" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| services: | |
| mariadb: | |
| image: mariadb:10.5.29 | |
| env: | |
| MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: "yes" | |
| MARIADB_DATABASE: kytedev | |
| ports: | |
| - 3306:3306 | |
| options: >- | |
| --health-cmd="healthcheck.sh --connect --innodb_initialized" | |
| --health-interval=5s | |
| --health-timeout=5s | |
| --health-retries=10 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.2' | |
| extensions: mysqli, curl, mbstring, json | |
| coverage: none | |
| - name: Validate composer.json and composer.lock | |
| run: composer validate --strict | |
| - name: Cache Composer packages | |
| id: composer-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: vendor | |
| key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-php- | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-progress | |
| - name: Run unit tests | |
| env: | |
| KYTE_DB_HOST: 127.0.0.1 | |
| KYTE_DB_USERNAME: root | |
| KYTE_DB_PASSWORD: "" | |
| KYTE_DB_DATABASE: kytedev | |
| KYTE_DB_CHARSET: utf8 | |
| run: vendor/bin/phpunit --testsuite unit |