Skip to content

Merge pull request #1 from dealnews/next #12

Merge pull request #1 from dealnews/next

Merge pull request #1 from dealnews/next #12

Workflow file for this run

name: Testing DealNews\DB
on: [push]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['8.0', '8.1', '8.2']
include:
- operating-system: 'ubuntu-latest'
php-versions: '8.0'
phpunit-versions: 9
# Service containers to run with `container-job`
services:
# Label used to access the service container
db-pgsql-sandbox:
# Docker Hub image
image: postgres
# Provide the password for postgres
env:
POSTGRES_DB: pgtestdb
POSTGRES_USER: test
POSTGRES_PASSWORD: test
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
DB_DATABASE: mytestdb
DB_USER: root
DB_PASSWORD: root
steps:
- name: Set up MySQL
run: |
sudo /etc/init.d/mysql start
mysql -e 'CREATE DATABASE ${{ env.DB_DATABASE }};' -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }}
- name: Checkout
uses: actions/checkout@v3
- name: Composer Install
uses: php-actions/composer@v6
with:
php_version: ${{ matrix.php-versions }}
- name: PHPUnit tests
uses: php-actions/phpunit@v3
with:
php_extensions: "pcov mysqli mysqlnd pdo pdo_mysql pdo_pgsql pdo_sqlite pgsql sqlite3"
version: "9.6"
php_version: ${{ matrix.php-versions }}
- name: Run Phan
uses: k1LoW/phan-action@v0