Refactor delete loops to queries #35
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# GitHub Action for Laravel with MySQL and Redis | |
name: Testing Laravel with MySQL | |
on: [pull_request] | |
jobs: | |
laravel: | |
name: Laravel ${{ matrix.laravel }} (PHP ${{ matrix.php }}) | |
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: | |
laravel: [ ^10.0, ^11.0 ] | |
php: ['8.2', '8.3'] | |
include: | |
- laravel: ^10.0 | |
testbench: ^8.0 | |
- laravel: ^11.0 | |
testbench: ^9.0 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- 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 }} | |
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 require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update | |
composer update --prefer-dist --no-interaction --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 |