Rilis v2510.0.0 #106
Workflow file for this run
This file contains hidden or 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 Test | |
on: | |
pull_request: | |
branches: [master, rilis-dev, bug-fix] | |
jobs: | |
laravel-tests: | |
runs-on: ubuntu-latest | |
services: | |
mysql: | |
image: mysql:8.0 | |
env: | |
MYSQL_DATABASE: testing_db | |
MYSQL_ROOT_PASSWORD: secret | |
ports: | |
- 3306:3306 | |
options: >- | |
--health-cmd="mysqladmin ping --silent" | |
--health-interval=10s | |
--health-timeout=5s | |
--health-retries=3 | |
steps: | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.1' | |
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv | |
coverage: none | |
- uses: actions/checkout@v4 | |
- name: Copy .env | |
run: php -r "file_exists('.env') || copy('.env.example', '.env');" | |
- name: Install Dependencies | |
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | |
- name: Generate key | |
run: php artisan key:generate | |
- name: Directory Permissions | |
run: chmod -R 777 storage bootstrap/cache | |
- name: Extract database testing | |
run: | | |
tar -xzf database/database_test.sql.tar.gz -C database | |
- name: Wait for MySQL | |
run: sleep 15 | |
- name: Import SQL file into MySQL | |
run: | | |
mysql -h 127.0.0.1 -P 3306 -u root -psecret testing_db < ./database/database_test.sql | |
mysql -h 127.0.0.1 -P 3306 -u root -psecret testing_db < ./database/update_view.sql | |
- name: Execute tests (Unit and Feature tests) via PHPUnit/Pest | |
env: | |
DB_CONNECTION: mysql | |
DB_DATABASE: testing_db | |
DB_USERNAME: root | |
DB_PASSWORD: secret | |
run: php artisan migrate && php artisan test |