Skip to content

Solve warnings and remove deprecated code #304

Solve warnings and remove deprecated code

Solve warnings and remove deprecated code #304

Workflow file for this run

name: CI
on:
pull_request:
push:
branches:
- v1
- v2
- v3
jobs:
CI:
runs-on: ubuntu-22.04
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
php: [7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1]
experimental: [false]
composer-extra: ['']
include:
- php: 5.6
experimental: false
- php: 8.2
experimental: false
- php: 8.3
experimental: false
- php: 8.4
experimental: true
composer-extra: '--ignore-platform-req=php+'
env:
PHP_VERSION: ${{ matrix.php }}
name: PHP ${{ matrix.php }}
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: bz2,xml,curl
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 10
- name: Validate composer.json
run: composer validate
- name: Cache composer files
uses: actions/cache@v3
with:
path: ~/.composer/cache/files
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
- name: Install dependencies using composer
run: composer install --prefer-dist --no-interaction ${{ matrix.composer-extra }}
- name: PHP CodeStyle
run: |
mkdir -p build/logs
vendor/bin/phpcs src tests --extensions=php --ignore=bootstrap --report=checkstyle --report-file=build/logs/checkstyle.xml --standard=build/config/phpcs.xml -v
vendor/bin/phpmd src,tests xml build/config/phpmd.xml
- name: Run PHPUnit
run: vendor/bin/phpunit -c phpunit.xml --verbose
- name: Upload Coveralls coverage
if: github.repository == 'Austinb/GameQ'
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer global require php-coveralls/php-coveralls
php ~/.composer/vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v
- name: Upload Scrutinizer coverage
uses: sudo-bot/action-scrutinizer@latest
if: github.repository == 'Austinb/GameQ'
with:
cli-args: "--format=php-clover build/logs/clover.xml --revision=${{ github.event.pull_request.head.sha || github.sha }}"