Skip to content

Update composer.json (#14) #82

Update composer.json (#14)

Update composer.json (#14) #82

Workflow file for this run

name: databases
on:
push:
pull_request:
jobs:
mysql_57:
runs-on: ubuntu-22.04
services:
mysql:
image: mysql:5.7
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: test1
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
redis:
image: redis:7.0
ports:
- 6379:6379
options: --entrypoint redis-server
strategy:
fail-fast: true
name: MySQL 5.7
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, pdo_mysql
tools: composer:v2
coverage: none
- name: Install dependencies
uses: nick-fields/retry@v2
with:
timeout_minutes: 5
max_attempts: 5
command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress
- name: Run Scripts Before Test
run: |
mkdir -p logs
mkdir -p storage/app/tests
cp .env.phpunit.example .env.phpunit
- name: Migrate
run: php leevel migrate:migrate --env=env.phpunit
- name: Migrate common database
run: php leevel migrate:migrate --env=env.phpunit --database=development_common
- name: Execute tests against PHPUnit
run: php build/phpunit
env:
DB_PORT: ${{ job.services.mysql.ports[3306] }}
DB_USERNAME: root
mysql_8:
runs-on: ubuntu-22.04
services:
mysql:
image: mysql:8
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: test1
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
redis:
image: redis:7.0
ports:
- 6379:6379
options: --entrypoint redis-server
strategy:
fail-fast: true
name: MySQL 8.0
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, pdo_mysql
tools: composer:v2
coverage: none
- name: Install dependencies
uses: nick-fields/retry@v2
with:
timeout_minutes: 5
max_attempts: 5
command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress
- name: Run Scripts Before Test
run: |
mkdir -p logs
mkdir -p storage/app/tests
cp .env.phpunit.example .env.phpunit
- name: Migrate
run: php leevel migrate:migrate --env=env.phpunit
- name: Migrate common database
run: php leevel migrate:migrate --env=env.phpunit --database=development_common
- name: Execute tests against PHPUnit
run: php build/phpunit
env:
DB_PORT: ${{ job.services.mysql.ports[3306] }}
DB_USERNAME: root
mariadb:
runs-on: ubuntu-22.04
services:
mysql:
image: mariadb:10
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: test1
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
redis:
image: redis:7.0
ports:
- 6379:6379
options: --entrypoint redis-server
strategy:
fail-fast: true
name: MariaDB 10
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.3
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, pdo_mysql
tools: composer:v2
coverage: none
- name: Install dependencies
uses: nick-fields/retry@v2
with:
timeout_minutes: 5
max_attempts: 5
command: composer update --prefer-stable --prefer-dist --no-interaction --no-progress
- name: Run Scripts Before Test
run: |
mkdir -p logs
mkdir -p storage/app/tests
cp .env.phpunit.example .env.phpunit
- name: Migrate
run: php leevel migrate:migrate --env=env.phpunit
- name: Migrate common database
run: php leevel migrate:migrate --env=env.phpunit --database=development_common
- name: Execute tests against PHPUnit
run: php build/phpunit
env:
DB_PORT: ${{ job.services.mysql.ports[3306] }}
DB_USERNAME: root