Inertia rewrite #303
Workflow file for this run
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: Laravel Tests | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
laravel-tests: | |
runs-on: ubuntu-22.04 | |
services: | |
mysql: | |
image: mysql:5.7 | |
env: | |
MYSQL_ALLOW_EMPTY_PASSWORD: yes | |
MYSQL_DATABASE: crystal_rss_revolved_test | |
ports: | |
- 33306:3306 | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Start MariaDB | |
run: sudo /etc/init.d/mysql start | |
- name: Create MariaDB database | |
run: mysql -uroot -proot -e 'CREATE DATABASE crystal_rss_revolved_test' | |
- name: Setup PHP with Xdebug | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.2 | |
coverage: xdebug | |
- name: Copy .env | |
run: php -r "file_exists('.env') || copy('.env.github', '.env');" | |
- name: Install Dependencies | |
run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist | |
- name: Generate key | |
run: php artisan key:generate | |
- name: Directory Permissions | |
run: chmod -R 777 storage bootstrap/cache | |
- name: Install npm dependencies | |
run: npm ci | |
- name: Compile assets | |
run: npm run build | |
- name: Run migrations | |
run: php artisan migrate | |
- name: Execute tests (Unit and Feature tests) via PHPUnit | |
run: php artisan test --coverage --min=100 |