WIP #408
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: | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: ["8.2", "8.3", "8.4"] | |
| laravel: ["12.*", "13.*"] | |
| exclude: | |
| - php: "8.2" | |
| laravel: "13.*" | |
| name: PHP ${{ matrix.php }} — Laravel ${{ matrix.laravel }} | |
| services: | |
| redis: | |
| image: redis:7 | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 5s | |
| --health-timeout 3s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: redis | |
| coverage: none | |
| - name: Pin Laravel version | |
| run: composer require "laravel/framework:${{ matrix.laravel }}" --no-update --no-interaction | |
| - name: Install dependencies | |
| run: composer update --prefer-dist --no-interaction --no-progress | |
| - name: Run tests | |
| run: vendor/bin/phpunit | |
| analyse: | |
| runs-on: ubuntu-latest | |
| name: Static analysis | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: "8.3" | |
| coverage: none | |
| - name: Install dependencies | |
| run: composer update --prefer-dist --no-interaction --no-progress | |
| - name: Run Pint | |
| run: composer lint | |
| - name: Run Larastan | |
| run: vendor/bin/phpstan analyse --memory-limit=512M --error-format=github | |
| database: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - label: MySQL | |
| driver: mysql | |
| image: mysql:8.4 | |
| port: 3306 | |
| container_port: 3306 | |
| username: root | |
| password: normcache | |
| options: >- | |
| --health-cmd "mysqladmin ping --password=normcache" | |
| --health-interval 5s | |
| --health-timeout 3s | |
| --health-retries 10 | |
| - label: PostgreSQL | |
| driver: pgsql | |
| image: postgres:17 | |
| port: 5432 | |
| container_port: 5432 | |
| username: postgres | |
| password: normcache | |
| options: >- | |
| --health-cmd "pg_isready -U postgres -d normcache" | |
| --health-interval 5s | |
| --health-timeout 3s | |
| --health-retries 10 | |
| - label: MariaDB | |
| driver: mariadb | |
| image: mariadb:11.4 | |
| port: 3307 | |
| container_port: 3306 | |
| username: root | |
| password: normcache | |
| options: >- | |
| --health-cmd "healthcheck.sh --connect --innodb_initialized" | |
| --health-interval 5s | |
| --health-timeout 3s | |
| --health-retries 10 | |
| name: Database / ${{ matrix.label }} | |
| services: | |
| redis: | |
| image: redis:7 | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 5s | |
| --health-timeout 3s | |
| --health-retries 5 | |
| database: | |
| image: ${{ matrix.image }} | |
| env: | |
| MYSQL_DATABASE: normcache | |
| MYSQL_ROOT_PASSWORD: normcache | |
| POSTGRES_DB: normcache | |
| POSTGRES_PASSWORD: normcache | |
| MARIADB_DATABASE: normcache | |
| MARIADB_ROOT_PASSWORD: normcache | |
| ports: | |
| - ${{ matrix.port }}:${{ matrix.container_port }} | |
| options: ${{ matrix.options }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: "8.3" | |
| extensions: redis, pdo_mysql, pdo_pgsql | |
| coverage: none | |
| - name: Install dependencies | |
| run: composer update --prefer-dist --no-interaction --no-progress | |
| - name: Run database contract and cascade tests | |
| env: | |
| TEST_DB_DRIVER: ${{ matrix.driver }} | |
| TEST_DB_HOST: 127.0.0.1 | |
| TEST_DB_PORT: ${{ matrix.port }} | |
| TEST_DB_DATABASE: normcache | |
| TEST_DB_USERNAME: ${{ matrix.username }} | |
| TEST_DB_PASSWORD: ${{ matrix.password }} | |
| run: >- | |
| vendor/bin/phpunit | |
| tests/Integration/Contract | |
| tests/Integration/Cache/CascadeInvalidationTest.php |