Skip to content

added orm version for test matrix #127

added orm version for test matrix

added orm version for test matrix #127

Workflow file for this run

name: Tests
on: ["push", "pull_request"]
jobs:
build:
name: PHP ${{ matrix.php }} with ORM ${{ matrix.orm }}
runs-on: ubuntu-latest
strategy:
matrix:
orm:
- 2.7
php:
- 7.2
- 7.3
- 7.4
- 8.0
- 8.1
- 8.2
steps:
- uses: actions/checkout@v2
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- run: composer validate
- id: composer-cache
uses: actions/cache@v2
with:
path: vendor
key: php-${{ matrix.php }}-${{ matrix.orm }}-${{ hashFiles('**/composer.lock') }}
restore-keys: php-${{ matrix.php }}-${{ matrix.orm }}-
- if: ${{ steps.composer-cache.outputs.cache-hit != 'true' && ((startsWith(matrix.orm, '3.0') && matrix.php >= '8.1') || matrix.orm == '2.7') }}
run: composer install --prefer-dist --no-progress --no-suggest
- if: ${{ steps.composer-cache.outputs.cache-hit != 'true' && ((startsWith(matrix.orm, '3.0') && matrix.php >= '8.1') || matrix.orm == '2.7') }}
run: composer update doctrine/orm:^${{ matrix.orm }}
- run: composer run test
if: ${{ (startsWith(matrix.orm, '3.0') && matrix.php >= '8.1') || matrix.orm == '2.7' }}
- run: composer run lint -- --dry-run
if: ${{ matrix.php < '8.1' && ((startsWith(matrix.orm, '3.0') && matrix.php >= '8.1') || matrix.orm == '2.7') }}