Skip to content

Compability updates and bugfix #30

Compability updates and bugfix

Compability updates and bugfix #30

Workflow file for this run

# GitHub Action for Laravel with MySQL and Redis
name: Testing Laravel with MySQL
on: [pull_request]
jobs:
laravel:
name: Laravel (PHP ${{ matrix.php-versions }})
runs-on: ubuntu-latest
env:
DB_DATABASE: logtodb
DB_USERNAME: root
DB_PASSWORD: root
BROADCAST_DRIVER: log
CACHE_DRIVER: file
QUEUE_CONNECTION: file
SESSION_DRIVER: file
# Docs: https://docs.github.com/en/actions/using-containerized-services
services:
mysql:
image: mysql:latest
env:
MYSQL_ALLOW_EMPTY_PASSWORD: false
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: logtodb
ports:
- 3306/tcp
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
fail-fast: false
matrix:
php-versions: ['8.2']
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.10.0
with:
mongodb-version: 7.0
# Docs: https://github.com/shivammathur/setup-php
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, dom, fileinfo, mysql, mongodb
coverage: xdebug
# Local MySQL service in GitHub hosted environments is disabled by default.
# If you are using it instead of service containers, make sure you start it.
# - name: Start mysql service
# run: sudo systemctl start mysql.service
- name: Install Composer dependencies
run: composer install --no-progress
- name: Test with phpunit
run: vendor/bin/phpunit --coverage-clover ./coverage.xml
env:
DB_PORT: ${{ job.services.mysql.ports['3306'] }}
- name: Upload to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODE_COV_TOKEN }}
files: ./coverage.xml
verbose: true