Skip to content

Add PHP 8.3

Add PHP 8.3 #167

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
pull_request:
jobs:
test:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
# https://www.php.net/supported-versions.php
php-versions: ['7.3', '7.4', '8.0']
# https://phpunit.de/supported-versions.html
phpunit-version: ['9.5.4']
experimental: [false]
include:
- php-versions: '7.1'
phpunit-version: '7.5.20'
experimental: false
- php-versions: '7.2'
phpunit-version: '8.5.15'
experimental: false
- php-versions: '8.1'
phpunit-version: '9.5.27'
experimental: false
- php-versions: '8.2'
phpunit-version: '9.5.27'
experimental: false
- php-versions: '8.3'
phpunit-version: '9.5.27'
experimental: false
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: composer, phpunit:${{ matrix.phpunit-version }}
coverage: xdebug
# Report deprecation errors.
ini-values: error_reporting=E_ALL
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install dependencies
# Use composer update instead of composer install to install a working set of
# dependencies on all PHP versions.
run: composer update --prefer-dist
- name: Test
run: phpunit --coverage-text --coverage-clover=coverage.xml
- name: Upload coverage data to codecov
if: matrix.php-versions == '8.2'
uses: codecov/codecov-action@v4
with:
files: ./coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
build-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
# fetch complete history so that the "last updated by" texts can be set correctly
fetch-depth: 0
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: Build Docs
run: |
cd docs
yarn install
yarn build
touch build/.nojekyll
- name: Upload to GitHub Pages
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main')
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: docs/build
CLEAN: true
SINGLE_COMMIT: true
GIT_CONFIG_NAME: GitHub Actions
GIT_CONFIG_EMAIL: [email protected]