Skip to content

Merge pull request #122 from fumeapp/laravel-11 #68

Merge pull request #122 from fumeapp/laravel-11

Merge pull request #122 from fumeapp/laravel-11 #68

Workflow file for this run

name: Test PHP
on:
push:
branches-ignore:
- staging
- production
paths:
- "**.php"
- "!client/**"
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
php: [8.3]
name: PHP Version:${{ matrix.php }}
steps:
- name: "MySQL - tweak mysql"
run: |
echo "[mysqld]" | sudo tee -a /etc/mysql/conf.d/mysql.cnf > /dev/null
echo "skip-grant-tables" | sudo tee -a /etc/mysql/conf.d/mysql.cnf > /dev/null
- name: MySQL - restart and add database
run: |
sudo service mysql restart
mysql -u root -e "CREATE DATABASE IF NOT EXISTS \`test-laranuxt\`"
- name: Checkout
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, intl, pdo_mysql, zip, gd, exif, pcntl, bcmath, ctype, fileinfo, json, tokenizer, xml, dom, curl, iconv, openssl, readline, sockets, zip, zlib
coverage: xdebug
tools: composer:v2
- name: Get Composer Cache Directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
- name: Run phpunit
run: XDEBUG_MODE=coverage vendor/bin/phpunit --color=always --testdox --coverage-text --coverage-html coverage/ -c tests/php/phpunit.xml
- uses: actions/upload-artifact@v2
with:
name: coverage-html
path: coverage/