Solve warnings and remove deprecated code #322
Workflow file for this run
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: 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: [5.6, 7.0, 7.1, 7.2, 7.3, 7.4, 8.0, 8.1, 8.2, 8.3] | |
experimental: [false] | |
composer-extra: [''] | |
include: | |
- 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 | |
uses: coverallsapp/github-action@v2 | |
with: | |
parallel: true | |
file: build/logs/clover.xml | |
- 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 }}" | |
Finish: | |
needs: CI | |
if: ${{ always() }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Coveralls Finished | |
uses: coverallsapp/github-action@v2 | |
with: | |
parallel-finished: true |