Testing improvements; always run the integration & unit tests even if failure occurred

This commit is contained in:
Dane Everitt 2020-06-28 15:40:02 -07:00
parent d6b765ed16
commit d0a4d477eb
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53
1 changed files with 9 additions and 3 deletions

View File

@ -29,10 +29,12 @@ jobs:
- name: cache dependencies - name: cache dependencies
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
path: ${{ steps.composer-cache.outputs.dir }} path: |
key: ${{ runner.os }}-composer-${{ matrix.php }}-${{ hashFiles('**.composer.lock') }} ~/.php_cs.cache
${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-cache-${{ matrix.php }}-${{ hashFiles('**.composer.lock') }}
restore-keys: | restore-keys: |
${{ runner.os }}-composer-${{ matrix.php }}- ${{ runner.os }}-cache-${{ matrix.php }}-
- name: setup - name: setup
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
@ -44,13 +46,17 @@ jobs:
run: cp .env.ci .env run: cp .env.ci .env
- name: install dependencies - name: install dependencies
run: composer install --prefer-dist --no-interaction --no-progress run: composer install --prefer-dist --no-interaction --no-progress
- name: run cs-fixer
run: vendor/bin/php-cs-fixer fix --dry-run --diff --diff-format=udiff
- name: execute unit tests - name: execute unit tests
run: vendor/bin/phpunit --bootstrap bootstrap/app.php tests/Unit run: vendor/bin/phpunit --bootstrap bootstrap/app.php tests/Unit
if: ${{ always() }}
env: env:
DB_CONNECTION: testing DB_CONNECTION: testing
TESTING_DB_HOST: UNIT_NO_DB TESTING_DB_HOST: UNIT_NO_DB
- name: execute integration tests - name: execute integration tests
run: vendor/bin/phpunit tests/Integration run: vendor/bin/phpunit tests/Integration
if: ${{ always() }}
env: env:
TESTING_DB_PORT: ${{ job.services.mysql.ports[3306] }} TESTING_DB_PORT: ${{ job.services.mysql.ports[3306] }}
TESTING_DB_USERNAME: root TESTING_DB_USERNAME: root