PHPUnit #899
This file contains 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: "PHPUnit" | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
schedule: | |
- cron: '0 15 * * 2' | |
jobs: | |
phpunit-tests: | |
strategy: | |
fail-fast: false | |
matrix: | |
php_versions: [ | |
'8.2', | |
'8.3', | |
] | |
name: PHP ${{ matrix.php_versions }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: install php ${{ matrix.php_versions }} with extensions | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php_versions }} | |
extensions: json ctype openssl ssh2 gd pcntl | |
coverage: xdebug | |
tools: none | |
- name: checkout repository | |
uses: actions/checkout@v4 | |
- name: install npm dependencies | |
run: npm install | |
working-directory: laravel | |
- name: npm run build | |
run: npm run build | |
working-directory: laravel | |
- name: install dependencies | |
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | |
working-directory: laravel | |
- name: cache config, routes and views | |
run: | | |
php artisan optimize --env=testing | |
php artisan view:cache --env=testing | |
working-directory: laravel | |
- name: run migrations | |
run: php artisan migrate:fresh --seed --no-interaction --env=testing | |
working-directory: laravel | |
- name: run phpunit tests | |
run: php artisan test --without-tty --env=testing | |
working-directory: laravel |