Skip to content

Update README: add CI, PHP, license, and Docker badges #12

Update README: add CI, PHP, license, and Docker badges

Update README: add CI, PHP, license, and Docker badges #12

Workflow file for this run

name: CI
on:
pull_request:
branches:
- main
push:
branches:
- main
permissions:
contents: read
jobs:
validate:
name: Validate (PHP ${{ matrix.php-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version: ['8.4', '8.5']
steps:
- uses: actions/checkout@v6
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: json
coverage: none
- name: Cache Composer dependencies
uses: actions/cache@v5
with:
path: |
~/.composer/cache/files
~/.cache/composer/files
key: ${{ runner.os }}-composer-php${{ matrix.php-version }}-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-composer-php${{ matrix.php-version }}-
- name: Validate composer.json
run: composer validate --strict
- name: Install dependencies
run: composer install --prefer-dist --no-interaction --no-progress --ignore-platform-req=ext-xdebug
- name: Linting
run: composer check:lint
- name: Coding style
run: composer check:cs
- name: Static analysis
run: composer check:phpstan
- name: Unit tests
run: composer test
- name: Build production Docker image
uses: docker/build-push-action@v7
with:
context: .
file: .docker/Dockerfile
target: production
push: false