Merge pull request #359 from juzaweb/develop #171
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: Run phpunit test suite | |
on: [push, pull_request] | |
jobs: | |
laravel-tests: | |
runs-on: ${{ matrix.os }} | |
services: | |
mysql: | |
image: mysql:8.0.21 | |
env: | |
MYSQL_ALLOW_EMPTY_PASSWORD: yes | |
MYSQL_DATABASE: laravel | |
MYSQL_USER: laravel | |
MYSQL_PASSWORD: laravel | |
ports: | |
- 3306:3306 | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [ubuntu-latest] | |
php: [8.0, 8.1] | |
name: PHP${{ matrix.php }} - ${{ matrix.os }} | |
steps: | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick | |
coverage: none | |
- uses: actions/checkout@v2 | |
- name: Install Dependencies | |
run: composer install | |
- name: Generate key | |
run: php artisan key:generate | |
- name: Clear Configuration | |
run: php artisan config:clear | |
- name: Directory Permissions | |
run: chmod -R 777 storage bootstrap/cache | |
- name: Execute tests Install | |
run: php artisan test vendor/juzaweb/modules/modules/Tests/InstallTest.php | |
- name: Install example plugin to test | |
run: composer require juzaweb/example | |
- name: Execute tests (Unit and Feature tests) | |
run: php artisan test |