Skip to content

relationship_refactor #17

relationship_refactor

relationship_refactor #17

Workflow file for this run

name: PHP Build
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ 8.1, 8.2, 8.3 ]
env:
MYSQL_HOST: localhost
MYSQL_USER: root
MYSQL_PASS: root
PGSQL_HOST: localhost
PGSQL_USER: cormatest
PGSQL_PASS: cormatest
PGSQL_PORT: 5432
steps:
- uses: actions/checkout@v4
- name: Start MySQL
run: |
sudo systemctl start mysql
- name: Start PostgreSQL
run: |
sudo systemctl start postgresql
pg_isready
- name: Create test postgres user
run: |
sudo -u postgres psql --command="CREATE USER $PGSQL_USER PASSWORD '$PGSQL_PASS'" --command="GRANT CREATE ON DATABASE postgres TO $PGSQL_USER"
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress
- name: Run test suite
run: composer run-script test