mirror of
https://github.com/Geckon01/JsonFicatorPHP.git
synced 2026-10-11 14:05:14 +00:00
48 lines
1.1 KiB
YAML
48 lines
1.1 KiB
YAML
name: PHP Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [main, master]
|
|
pull_request:
|
|
branches: [main, master]
|
|
|
|
jobs:
|
|
tests:
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
php-version: ['8.2', '8.3', '8.4']
|
|
|
|
name: PHP ${{ matrix.php-version }}
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: ${{ matrix.php-version }}
|
|
extensions: mbstring, json
|
|
coverage: none
|
|
|
|
- name: Validate composer.json
|
|
run: composer validate --strict
|
|
|
|
- name: Cache Composer packages
|
|
id: composer-cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: vendor
|
|
key: ${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.json') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-php-${{ matrix.php-version }}-
|
|
|
|
- name: Install dependencies
|
|
run: composer install --prefer-dist --no-progress
|
|
|
|
- name: Run unit tests
|
|
run: vendor/bin/phpunit --testsuite unit --no-coverage
|