Try another syntax #31
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
name: Run tests | |
on: | |
workflow_dispatch: | |
pull_request: | |
paths: | |
- 'src/**' | |
- 'tests/**' | |
push: | |
branches: [ master ] | |
paths: | |
- 'src/**' | |
- 'tests/**' | |
jobs: | |
php-test: | |
runs-on: ubuntu-latest | |
name: Test on PHP${{matrix.php}} | |
strategy: | |
matrix: | |
php: ["8.1", "8.2", "8.3"] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
uses: ramsey/composer-install@v2 | |
- name: Run tests | |
run: composer test | |
mariadb-test: | |
runs-on: ubuntu-latest | |
name: Test with MariaDB | |
services: | |
mariadb: | |
image: mariadb:10 | |
env: | |
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: yes | |
MARIADB_DATABASE: sfa | |
MARIADB_USER: sfa | |
MARIADB_PASSWORD: sfa | |
ports: | |
- 3306:3306 | |
options: --health-cmd="healthcheck.sh --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
uses: ramsey/composer-install@v2 | |
- name: Run tests | |
run: composer test-maria | |
mysql-test: | |
runs-on: ubuntu-latest | |
name: Test with MySQL | |
services: | |
mysql: | |
image: mysql:8 | |
env: | |
MYSQL_ALLOW_EMPTY_PASSWORD: yes | |
MYSQL_DATABASE: sfa | |
MYSQL_USER: sfa | |
MYSQL_PASSWORD: sfa | |
ports: | |
- 3306:3306 | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
uses: ramsey/composer-install@v2 | |
- name: Run tests | |
run: composer test-my | |
postgis-test: | |
runs-on: ubuntu-latest | |
name: Test with PostGIS | |
services: | |
postgis: | |
image: postgis/postgis:14-3.3 | |
env: | |
POSTGRES_DB: sfa | |
POSTGRES_USER: sfa | |
POSTGRES_PASSWORD: sfa | |
ports: | |
- 5432:5432 | |
options: --health-cmd=pg_isready --health-interval=10s --health-timeout=5s --health-retries=3 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
uses: ramsey/composer-install@v2 | |
- name: Run tests | |
run: composer test-pg |