ci: phpunit fix #18
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: PHPUnit & Psalm | |
on: [push] | |
permissions: | |
contents: read | |
jobs: | |
phpunit: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
php-version: [ 8.0, 8.1, 8.2, 8.3, 8.4 ] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
extensions: mbstring, pdo, mysql, pgsql | |
ini-values: memory_limit=1G, post_max_size=50M, upload_max_filesize=50M | |
coverage: none | |
- name: Start MySQL | |
uses: mirromutth/mysql-action@v1 | |
with: | |
mysql version: '8.0' | |
root password: 'root' | |
database: 'test_db' | |
user: 'test_user' | |
password: 'test_password' | |
- name: Start PostgreSQL | |
uses: Harmon758/[email protected] | |
with: | |
postgresql version: '14' | |
postgresql db: 'test_db' | |
postgresql user: 'test_user' | |
postgresql password: 'test_password' | |
- name: Install dependencies | |
run: | | |
composer install --no-progress --no-suggest | |
- name: Run PHPUnit tests | |
run: vendor/bin/phpunit --testdox | |
psalm: | |
runs-on: ubuntu-latest | |
env: | |
php-version: '8.0' | |
steps: | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ env.php-version }} | |
ini-values: "memory_limit=-1" | |
coverage: none | |
- name: Checkout target branch | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.base_ref }} | |
- name: Checkout PR | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: composer install --prefer-dist --no-progress | |
- name: Psalm | |
run: ./vendor/bin/psalm --output-format=github --no-progress |