Skip to content

allow PHP 8.3 and update CI config #1514

allow PHP 8.3 and update CI config

allow PHP 8.3 and update CI config #1514

name: Continuous integration
on:
push:
branches:
- main
- 4.x
pull_request:
paths-ignore:
- "**.md"
jobs:
build:
strategy:
matrix:
include:
- php-versions: "8.0"
- php-versions: "8.1"
- php-versions: "8.2"
- php-versions: "8.3"
stable: true
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring
coverage: pcov
- name: ♻️ Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: ♻️ Cache composer dependencies
uses: actions/[email protected]
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- name: ⚙️ Install dependencies
run: composer install --no-progress --no-suggest --prefer-dist --optimize-autoloader
- name: 👕 Lint
run: composer cs
- name: 🔬 Static analysis
run: composer stan
- name: ♻️ Test cache
uses: actions/[email protected]
with:
path: tests/.phpunit.result.cache
key: ${{ runner.os }}-test-${{ github.sha }}
restore-keys: |
${{ runner.os }}-test-
- name: 🧪 Test
run: composer test:ci
- name: 📊 Upload coverage results to Coveralls
if: matrix.stable
uses: codecov/[email protected]
with:
file: ./build/logs/clover.xml
- name: 📃 Generate documentation
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && matrix.stable == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GH_PRIVATE_ACCESS_TOKEN }}
run: |
composer generate-docs
git config user.email "${{ github.actor }}@users.noreply.github.com"
git config user.name "${{ github.actor }}"
echo `git add -A && git commit -m "docs: update documentation"`
git push --follow-tags origin main