Test on platforms #834
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
# DO NOT EDIT THIS FILE! | |
# | |
# It's auto-generated by sonata-project/dev-kit package. | |
name: Test on platforms | |
on: | |
schedule: | |
- cron: '30 0 * * *' | |
push: | |
branches: | |
- 1.x | |
- 2.x | |
pull_request: | |
jobs: | |
test-mysql: | |
name: PHP ${{ matrix.php-version }} + MySQL ${{ matrix.mysql-version }} + ${{ matrix.dependencies }} | |
runs-on: ubuntu-latest | |
continue-on-error: ${{ matrix.allowed-to-fail }} | |
env: | |
DATABASE_URL: mysql://[email protected]:3306/sonata_tests | |
services: | |
mysql: | |
image: mysql:${{ matrix.mysql-version }} | |
options: >- | |
--health-cmd "mysqladmin ping --silent" | |
-e MYSQL_ALLOW_EMPTY_PASSWORD=yes | |
-e MYSQL_DATABASE=sonata_tests | |
ports: | |
- 3306:3306 | |
strategy: | |
matrix: | |
php-version: | |
- '8.2' | |
mysql-version: | |
- '5.7' | |
- '8.0' | |
dependencies: [highest] | |
allowed-to-fail: [false] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install PHP with extensions | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
coverage: none | |
tools: composer:v2 | |
extensions: mysqli, pdo_mysql | |
- name: Add PHPUnit matcher | |
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
- name: Install Composer dependencies (${{ matrix.dependencies }}) | |
uses: ramsey/composer-install@v2 | |
with: | |
dependency-versions: ${{ matrix.dependencies }} | |
- name: Run Tests | |
run: make test | |
test-postgres: | |
name: PHP ${{ matrix.php-version }} + PostgreSQL ${{ matrix.postgres-version }} + ${{ matrix.dependencies }} | |
runs-on: ubuntu-latest | |
continue-on-error: ${{ matrix.allowed-to-fail }} | |
env: | |
DATABASE_URL: postgresql://postgres:[email protected]:5432/postgres?serverVersion=${{ matrix.postgres-version }}&charset=utf8 | |
services: | |
postgres: | |
image: postgres:${{ matrix.postgres-version }} | |
env: | |
POSTGRES_PASSWORD: postgres | |
options: >- | |
--health-cmd "pg_isready" | |
ports: | |
- 5432:5432 | |
strategy: | |
matrix: | |
php-version: | |
- '8.2' | |
postgres-version: | |
- '13' | |
- '14' | |
- '15' | |
dependencies: [highest] | |
allowed-to-fail: [false] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Install PHP with extensions | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
coverage: none | |
tools: composer:v2 | |
- name: Add PHPUnit matcher | |
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
- name: Install Composer dependencies (${{ matrix.dependencies }}) | |
uses: ramsey/composer-install@v2 | |
with: | |
dependency-versions: ${{ matrix.dependencies }} | |
- name: Run Tests | |
run: make test |