fix sidemenu search #5
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: TomatoPHP CI/CD | |
on: | |
pull_request: | |
branches: | |
- master | |
- develop | |
push: | |
branches: | |
- master | |
- develop | |
jobs: | |
laravel: | |
name: Laravel (PHP ${{ matrix.php-versions }}) | |
runs-on: ubuntu-latest | |
env: | |
DB_DATABASE: laravel | |
DB_USERNAME: root | |
DB_PASSWORD: password | |
services: | |
mysql: | |
image: mysql:latest | |
env: | |
MYSQL_ALLOW_EMPTY_PASSWORD: false | |
MYSQL_ROOT_PASSWORD: password | |
MYSQL_DATABASE: laravel | |
ports: | |
- 3306/tcp | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
redis: | |
image: redis | |
ports: | |
- 6379/tcp | |
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
strategy: | |
fail-fast: false | |
matrix: | |
php-versions: ['8.2'] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: sqlite, pdo_sqlite, pcntl, zip, intl, exif, mbstring, dom, fileinfo, mysql | |
coverage: xdebug | |
- name: Copy .env Before Install Composer | |
run: php -r "file_exists('.env') || copy('.env.example', '.env'); echo file_get_contents('.env');" | |
- name: Start MySQL Service | |
run: sudo /etc/init.d/mysql start | |
- name: Get composer cache directory | |
id: composer-cache | |
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
- name: Cache composer dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
# Use composer.json for key, if composer.lock is not committed. | |
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | |
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: Install Composer dependencies | |
run: composer install --no-progress --prefer-dist --optimize-autoloader | |
- name: Generate Applications Key | |
run: php artisan key:generate | |
- name: Clear Config | |
run: php artisan config:clear | |
- name: Run Migration | |
run: php artisan migrate -v | |
env: | |
DB_PORT: ${{ job.services.mysql.ports['3306'] }} | |
REDIS_PORT: ${{ job.services.redis.ports['6379'] }} | |
- name: Run NPM Install | |
run: npm install | |
- name: Run NPM Run Build | |
run: npm run build |