Skip to content
Merged

4.x #24

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: CI

on:
push:
branches: [main, '*.x']
pull_request:
branches: [main, '*.x']

permissions:
contents: read

jobs:
qa:
name: PHP ${{ matrix.php }} / QA
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
php: ['8.1', '8.2', '8.3', '8.4']

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: pdo, pdo_sqlite
coverage: none
tools: composer:v2
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Validate composer.json
run: composer validate --strict

- name: Get Composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"

- name: Cache Composer dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ runner.os }}-${{ matrix.php }}-${{ hashFiles('composer.json') }}
restore-keys: |
composer-${{ runner.os }}-${{ matrix.php }}-

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-interaction

- name: Coding standards (phpcs)
run: composer cs-ci

- name: Static analysis (PHPStan)
run: composer stan

- name: Unit tests (PHPUnit)
run: composer test
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,9 @@
/vendor/
/composer.lock
/.phpunit.result.cache
/.phpunit.cache/
/.phpcs-cache
/.php-cs-fixer.cache
/build/
/nbproject/private/
/*.log
Loading
Loading