Merge pull request #8034 from amit-webkul/datagrid #2772
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: CI | |
on: [push, pull_request] | |
permissions: | |
contents: read | |
jobs: | |
tests: | |
runs-on: ${{ matrix.operating-systems }} | |
strategy: | |
matrix: | |
operating-systems: [ubuntu-latest] | |
php-versions: ['8.1'] | |
name: PHP ${{ matrix.php-versions }} test on ${{ matrix.operating-systems }} | |
services: | |
mysql: | |
image: mysql:8.0 | |
env: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_DATABASE: bagisto | |
ports: | |
- 3306 | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=5 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: curl, fileinfo, gd, intl, mbstring, openssl, pdo, pdo_mysql, tokenizer, zip | |
- name: Composer Install | |
run: composer install | |
- name: Set Testing Environment | |
run: | | |
cp .env.example .env.testing | |
sed -i "s|^\(APP_ENV=\s*\).*$|\1testing|" .env.testing | |
sed -i "s|^\(DB_HOST=\s*\).*$|\1127.0.0.1|" .env.testing | |
sed -i "s|^\(DB_PORT=\s*\).*$|\1${{ job.services.mysql.ports['3306'] }}|" .env.testing | |
sed -i "s|^\(DB_DATABASE=\s*\).*$|\1bagisto|" .env.testing | |
sed -i "s|^\(DB_USERNAME=\s*\).*$|\1root|" .env.testing | |
sed -i "s|^\(DB_PASSWORD=\s*\).*$|\1root|" .env.testing | |
- name: Key Generate | |
run: php artisan key:generate --env=testing | |
- name: Optimize Stuffs | |
run: php artisan optimize --env=testing | |
- name: Migrate And Seed Database | |
run: php artisan migrate:fresh --seed --env=testing | |
- name: Vendor Publish | |
run: php artisan bagisto:publish --force | |
- name: Running Test | |
run: vendor/bin/pest --colors=always |