Fix test workflow matrix for databases

This commit is contained in:
Dane Everitt 2021-09-11 12:13:15 -07:00
parent db74b0024d
commit 0b521c011f
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53

View File

@ -46,8 +46,6 @@ jobs:
~/.php_cs.cache
${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-cache-${{ matrix.php }}-${{ hashFiles('**.composer.lock') }}
restore-keys: |
${{ runner.os }}-cache-${{ matrix.php }}-
- name: setup
uses: shivammathur/setup-php@v2
with:
@ -63,20 +61,20 @@ jobs:
run: vendor/bin/php-cs-fixer fix --dry-run --diff --diff-format=udiff --config .php_cs.dist
continue-on-error: true
- name: execute unit tests
run: vendor/bin/phpunit --bootstrap bootstrap/app.php tests/Unit
run: vendor/bin/phpunit --bootstrap vendor/autoload.php tests/Unit
if: ${{ always() }}
env:
DB_CONNECTION: testing
TESTING_DB_HOST: UNIT_NO_DB
- name: execute integration tests (mysql)
run: vendor/bin/phpunit tests/Integration
if: "${{ matrix.database }} == 'mysql'"
if: ${{ matrix.database == 'mysql' }}
env:
TESTING_DB_PORT: ${{ job.services.mysql.ports[3306] }}
TESTING_DB_USERNAME: root
- name: execute integration tests (mariadb)
run: vendor/bin/phpunit tests/Integration
if: "${{ matrix.database }} == 'mariadb'"
if: ${{ matrix.database == 'mariadb' }}
env:
TESTING_DB_PORT: ${{ job.services.mariadb.ports[3306] }}
TESTING_DB_USERNAME: root