Skip to content

Merge pull request #123 from juzaweb/fix/comment-out-themes-modules-m… #517

Merge pull request #123 from juzaweb/fix/comment-out-themes-modules-m…

Merge pull request #123 from juzaweb/fix/comment-out-themes-modules-m… #517

Workflow file for this run

name: Test
on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master, develop ]
jobs:
unit-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [8.2, 8.3]
database: [mysql, pgsql]
include:
- database: mysql
db_port: 3306
- database: pgsql
db_port: 5432
name: Unit - PHP ${{ matrix.php }} - ${{ matrix.database }}
services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: testing
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
postgres:
image: postgres:15
env:
POSTGRES_DB: testing
POSTGRES_USER: root
POSTGRES_PASSWORD: password
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, pdo_mysql, pdo_pgsql, bcmath, soap, intl, gd, exif, iconv
coverage: none
- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-composer-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-${{ matrix.php }}-
${{ runner.os }}-composer-
- name: Install dependencies
run: |
composer install --prefer-dist --no-interaction --no-progress
- name: Run Laravel Pint
run: vendor/bin/pint --test
- name: Run Unit Tests
env:
DB_CONNECTION: ${{ matrix.database }}
DB_HOST: 127.0.0.1
DB_PORT: ${{ matrix.db_port }}
DB_DATABASE: testing
DB_USERNAME: root
DB_PASSWORD: password
run: vendor/bin/phpunit tests/Unit
feature-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [8.2, 8.3]
database: [mysql, pgsql]
include:
- database: mysql
db_port: 3306
- database: pgsql
db_port: 5432
name: Feature - PHP ${{ matrix.php }} - ${{ matrix.database }}
services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: testing
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
postgres:
image: postgres:15
env:
POSTGRES_DB: testing
POSTGRES_USER: root
POSTGRES_PASSWORD: password
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, pdo_mysql, pdo_pgsql, bcmath, soap, intl, gd, exif, iconv
coverage: none
- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-composer-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-${{ matrix.php }}-
${{ runner.os }}-composer-
- name: Install dependencies
run: |
composer install --prefer-dist --no-interaction --no-progress
- name: Run Laravel Pint
run: vendor/bin/pint --test
- name: Run Feature Tests
env:
DB_CONNECTION: ${{ matrix.database }}
DB_HOST: 127.0.0.1
DB_PORT: ${{ matrix.db_port }}
DB_DATABASE: testing
DB_USERNAME: root
DB_PASSWORD: password
run: vendor/bin/phpunit tests/Feature