Skip to content

Merge pull request #90 from inovector/develop #74

Merge pull request #90 from inovector/develop

Merge pull request #90 from inovector/develop #74

Workflow file for this run

name: run-tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
run-tests:
runs-on: ubuntu-latest
services:
redis:
image: redis
ports:
- 6379:6379
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3
mysql:
image: mysql:latest
env:
MYSQL_DATABASE: mixpost_test
MYSQL_USER: user
MYSQL_PASSWORD: secret
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
fail-fast: false
matrix:
php: [8.1, 8.2]
laravel: [^9.0, ^10.0]
name: P${{ matrix.php }} - L${{ matrix.laravel }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, mysql, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, redis
coverage: none
- name: Set Laravel version
run: |
sed -i 's/^9.0|^10.0/${{ matrix.laravel }}/g' composer.json
- name: Install composer dependencies
uses: ramsey/composer-install@v2
env:
COMPOSER_ROOT_VERSION: dev-main
with:
composer-options: "--prefer-dist --no-interaction"
- name: Execute tests
run: composer test
env:
REDIS_PORT: 6379
DB_PORT: 3306
DB_DATABASE: mixpost_test
DB_USERNAME: user
DB_PASSWORD: secret