ci: remove support for PHP 8.0 #1497
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: Continuous integration | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
merge_group: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
checks: | |
strategy: | |
matrix: | |
include: | |
- php-versions: "8.1" | |
- php-versions: "8.2" | |
stable: true | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup PHP, with composer and extensions | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: none, curl, json, dom, tokenizer, xml, xmlwriter, simplexml, iconv, mbstring, intl, sodium | |
coverage: pcov | |
- 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@v3 | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-composer-${{ matrix.php-versions }}-${{ hashFiles('**/composer.json') }} | |
restore-keys: ${{ runner.os }}-composer- | |
- name: ⚙️ Install dependencies | |
run: | | |
composer install --no-progress --prefer-dist --optimize-autoloader | |
composer --working-dir=tools install --no-progress --prefer-dist --optimize-autoloader | |
- name: ♻️ Tools cache | |
uses: actions/cache@v3 | |
with: | |
path: tools/cache | |
key: ${{ runner.os }}-tools-${{ matrix.php-versions }}-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-tools- | |
- name: 👕 Lint | |
if: matrix.stable | |
run: composer php-cs-fixer -- --format=checkstyle | tools/vendor/bin/cs2pr | |
- name: 🔬 Static analysis | |
if: matrix.stable | |
run: composer stan -- --error-format=checkstyle | tools/vendor/bin/cs2pr | |
- name: 🧪 Test | |
run: composer test:ci | |
- name: 📊 Upload coverage results to Codecov | |
if: matrix.stable | |
uses: codecov/codecov-action@v3 | |
with: | |
file: ./build/logs/clover.xml | |
- name: 📃 Generate documentation | |
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && matrix.stable | |
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 | |
build-website: | |
name: Check that website is building without errors | |
uses: ./.github/workflows/build-website.yml |