Skip to content

Improve README clarity and formatting #48

Improve README clarity and formatting

Improve README clarity and formatting #48

Workflow file for this run

name: Tests

Check failure on line 1 in .github/workflows/tests.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/tests.yml

Invalid workflow file

(Line: 20, Col: 9): Unexpected value 'if', (Line: 31, Col: 9): Unexpected value 'if'
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version: ['8.2', '8.3', '8.4', '8.5']
database: [sqlite, mysql, postgres]
services:
mysql:
if: matrix.database == 'mysql'
image: mysql:8.0
env:
MYSQL_ALLOW_EMPTY_PASSWORD: false
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: laravel_test
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
postgres:
if: matrix.database == 'postgres'
image: postgres:15
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: laravel_test
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: none
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Execute tests (SQLite)
if: matrix.database == 'sqlite'
env:
DB_CONNECTION: sqlite
DB_DATABASE: ':memory:'
run: ./vendor/bin/pest --parallel
- name: Execute tests (MySQL)
if: matrix.database == 'mysql'
env:
DB_CONNECTION: mysql
DB_HOST: 127.0.0.1
DB_PORT: 3306
DB_DATABASE: laravel_test
DB_USERNAME: root
DB_PASSWORD: password
run: ./vendor/bin/pest
- name: Execute tests (PostgreSQL)
if: matrix.database == 'postgres'
env:
DB_CONNECTION: pgsql
DB_HOST: 127.0.0.1
DB_PORT: 5432
DB_DATABASE: laravel_test
DB_USERNAME: postgres
DB_PASSWORD: password
run: ./vendor/bin/pest