Merge pull request #128 from weprodev/feat-83-cicd-workflow-configura… #22
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: Test LaraPanel Pkg for new changes | |
on: | |
push: | |
branches: | |
- "master" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get codes | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: "8.3" | |
tools: composer, phpunit | |
coverage: none | |
- name: Install LaraPanel Framework | |
run: composer create-project weprodev/larapanel-framework | |
- name: Link Local Package | |
working-directory: larapanel-framework | |
run: | | |
composer config repositories.local '{"type": "path", "url": "../LaraPanel", "options": {"symlink": true}}' | |
composer clear-cache | |
composer require weprodev/larapanel:@dev --no-cache --no-update | |
- name: Debug Composer Dependencies | |
working-directory: larapanel-framework | |
run: composer show weprodev/larapanel | |
- name: Set SQLite File Permissions | |
working-directory: larapanel-framework | |
run: | | |
touch database/database.sqlite | |
chmod 777 database/database.sqlite | |
- name: Directory Permissions | |
working-directory: larapanel-framework | |
run: chmod -R 777 storage bootstrap/cache | |
- name: Generate Application Key | |
working-directory: larapanel-framework | |
run: php artisan key:generate | |
- name: Migrate and Seed Database | |
working-directory: larapanel-framework | |
env: | |
APP_ENV: testing | |
CACHE_DRIVER: array | |
SESSION_DRIVER: array | |
QUEUE_CONNECTION: sync | |
DB_CONNECTION: sqlite | |
DB_DATABASE: ./database/database.sqlite | |
run: | | |
echo "Publishing Shared Service file" | |
php artisan vendor:publish --tag=larapanel-install --force | |
php artisan vendor:publish --tag=larapanel-config --force | |
echo "Publishing Panel Provider files" | |
php artisan vendor:publish --tag=larapanel-panel-controller --force | |
php artisan vendor:publish --tag=larapanel-panel-components --force | |
php artisan vendor:publish --tag=larapanel-view-PurpleAdmin --force | |
echo "Publishing User module files" | |
php artisan vendor:publish --tag=larapanel-route-user --force | |
php artisan vendor:publish --tag=larapanel-view-user --force | |
php artisan vendor:publish --tag=larapanel-lang --force | |
php artisan vendor:publish --tag=larapanel-admin-controller --force | |
php artisan vendor:publish --tag=larapanel-admin-request --force | |
php artisan vendor:publish --tag=larapanel-auth-controller --force | |
php artisan vendor:publish --tag=larapanel-models --force | |
php artisan vendor:publish --tag=larapanel-seeders --force | |
- name: Executing migrations and seeder files | |
working-directory: larapanel-framework | |
run: | | |
php artisan migrate:fresh --force | |
php artisan db:seed --force | |
- name: Execute E2E testing | |
working-directory: larapanel-framework | |
run: php artisan test |