Skip to content

Fix tests

Fix tests #1

Workflow file for this run

name: Unit Tests
on:
push:
branches:
- master
pull_request: ~
env:
SYMFONY_DEPRECATIONS_HELPER: weak
jobs:
unit-test:
name: Unit ( PHP ${{ matrix.php }} )
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- php: 8.0
- php: 8.1
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: intl, opcache, mysql, pdo_mysql, :xdebug
- name: Get composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json composer.lock') }}
restore-keys: ${{ runner.os }}-php-${{ matrix.php }}-composer-
- name: Install dependencies
run: composer update $COMPOSER_FLAGS
- name: Run unit tests
run: bin/phpunit
lowest:
name: Unit ( PHP ${{ matrix.php }} + Lowest )
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- php: 8.0
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: intl, opcache, mysql, pdo_mysql, :xdebug
- name: Get composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json composer.lock') }}
restore-keys: ${{ runner.os }}-php-${{ matrix.php }}-composer-
- name: Install dependencies
run: composer update --prefer-lowest --prefer-stable
- name: Run unit tests
run: bin/phpunit
mongodb:
name: Unit ( PHP ${{ matrix.php }} + MongoDB )
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [8.0, 8.1]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: intl, opcache, mysql, pdo_mysql, mongodb, :xdebug
- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.8.0
with:
mongodb-version: 6.0
- name: Get composer cache directory
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json composer.lock') }}
restore-keys: ${{ runner.os }}-php-${{ matrix.php }}-composer-
- name: Install dependencies
run: composer update
- name: Install Doctrine Mongodb ODM
run: composer require doctrine/mongodb-odm --with-all-dependencies
- name: Run unit tests
run: bin/phpunit