Composer update #996
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: CI | |
on: | |
push: | |
branches: | |
- '2.x' | |
- '3.x' | |
pull_request: | |
branches: | |
- '*' | |
permissions: | |
contents: read | |
jobs: | |
testsuite: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
php-version: ['8.2', '8.3'] | |
db-type: [pgsql] | |
dependencies: ['locked', 'highest'] | |
include: | |
- php-version: '8.1' | |
dependencies: 'highest' | |
name: PHP ${{ matrix.php-version }} (${{ matrix.dependencies }}) | |
services: | |
postgres: | |
image: postgres | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: watcher_crm | |
ports: | |
- 5432/tcp | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3 | |
redis: | |
image: redis | |
ports: | |
- 6379/tcp | |
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
extensions: mbstring, intl, redis, dbase, pdo_${{ matrix.db-type }} | |
coverage: pcov | |
- name: Composer install | |
uses: ramsey/composer-install@v3 | |
with: | |
dependency-versions: ${{ matrix.dependencies }} | |
- name: Composer post install command | |
if: ${{ matrix.dependencies != 'locked' }} | |
run: composer run-script post-install-cmd --no-interaction | |
- name: Test with phpunit | |
run: vendor/bin/phpunit | |
env: | |
REDIS_PORT: ${{ job.services.redis.ports['6379'] }} | |
DATABASE_TEST_URL: postgres://[email protected]:${{ job.services.postgres.ports['5432'] }}/watcher_crm | |
DEBUG: 'true' | |
coding-standard: | |
name: Coding Standard & Static Analysis | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.3' | |
extensions: mbstring, intl, redis, dbase | |
tools: cs2pr | |
coverage: none | |
- name: Composer install | |
uses: ramsey/composer-install@v3 | |
- name: Run PHP CodeSniffer | |
run: vendor/bin/phpcs --report=checkstyle | cs2pr | |
- name: Run psalm | |
if: success() || failure() | |
run: vendor/bin/psalm.phar --output-format=github | |
- name: Run phpstan | |
if: success() || failure() | |
run: vendor/bin/phpstan.phar analyse --error-format=checkstyle | cs2pr |