Skip to content

Update run-tests.yml #48

Update run-tests.yml

Update run-tests.yml #48

Workflow file for this run

name: run-tests
on:
push:
paths:
- '**.php'
- '.github/workflows/run-tests.yml'
- 'phpunit.xml.dist'
- 'composer.json'
- 'composer.lock'
jobs:
mysql:
runs-on: ubuntu-22.04
services:
mysql:
image: mysql:5.7
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: forge
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
redis:
image: redis
ports:
- 6379:6379
options: --entrypoint redis-server
strategy:
fail-fast: true
matrix:
php: [8.2, 8.3]
laravel: [10.*, 11.*]
stability: [prefer-stable]
include:
- laravel: 10.*
testbench: 8.*
collision: ^7.9
- laravel: 11.*
testbench: 9.*
collision: ^8.1
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - Stability ${{ matrix.stability }} - MySQL 5.7
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, redis, pcntl, zip
ini-values: error_reporting=E_ALL
tools: composer:v2
coverage: none
- name: Install redis-cli
run: sudo apt-get install -qq redis-tools
- name: Install dependencies
run: |
composer require "illuminate/contracts:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nunomaduro/collision:${{ matrix.collision }}" --no-interaction --no-update --dev
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: Execute tests
run: vendor/bin/pest
env:
DB_CONNECTION: mysql
DB_USERNAME: root
DB_NAME: forge
#
# pgsql:
# runs-on: ubuntu-22.04
#
# services:
# postgresql:
# image: postgres:14
# env:
# POSTGRES_DB: forge
# POSTGRES_USER: forge
# POSTGRES_PASSWORD: password
# ports:
# - 5432:5432
# options: --health-cmd=pg_isready --health-interval=10s --health-timeout=5s --health-retries=3
# redis:
# image: redis
# ports:
# - 6379:6379
# options: --entrypoint redis-server
#
# strategy:
# fail-fast: true
# matrix:
# php: [8.2, 8.3]
# laravel: [10.*, 11.*]
# include:
# - laravel: 10.*
# testbench: ^8.0
# collision: ^7.0
# - laravel: 11.*
# testbench: ^9.0
# collision: ^8.0
#
# name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - Stability ${{ matrix.stability }} - PostgreSQL 14
#
# 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, redis, pcntl, zip
# ini-values: error_reporting=E_ALL
# tools: composer:v2
# coverage: none
#
# - name: Install redis-cli
# run: sudo apt-get install -qq redis-tools
#
# - name: Install dependencies
# run: |
# composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "nunomaduro/collision:${{ matrix.collision }}" --no-interaction --no-update --dev
# composer update --${{ matrix.stability }} --prefer-dist --no-interaction
# - name: Execute tests
# run: vendor/bin/pest
# env:
# DB_CONNECTION: pgsql
# DB_PASSWORD: password