Files
espocrm/.github/workflows/test.yml
2026-04-23 12:32:56 +03:00

58 lines
1.1 KiB
YAML

name: Test
on:
push:
branches:
- 'master'
- 'fix'
paths:
- '**.php'
- '**.json'
- '**.yml'
- 'composer.lock'
- 'phpstan.neon'
pull_request:
paths:
- '**.php'
- '**.json'
- '**.yml'
- 'composer.lock'
- 'phpstan.neon'
- '.github/workflows/test.yml'
jobs:
test:
name: Test on PHP ${{ matrix.php-versions }}
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['8.3', '8.4', '8.5']
steps:
- uses: actions/checkout@v2
- name: Setup PHP with Composer
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: composer:v2
ini-values: memory_limit=1024M
- name: Cache Vendor
id: cache-vendor
uses: actions/cache@v4
with:
path: vendor
key: ${{ runner.os }}-vendor-${{ hashFiles('**/composer.lock') }}
- name: Composer install
if: steps.cache-vendor.outputs.cache-hit != 'true'
run: composer install
- name: Static analysis
run: vendor/bin/phpstan
- name: Unit testing
run: vendor/bin/phpunit tests/unit