Merge branch 'feature/modernise' of https://github.com/Chris53897/php… #1
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
# .github/workflows/code_checks.yaml | |
name: Code_Checks | |
on: ["push", "pull_request"] | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php: ['7.4'] | |
stability: [ prefer-stable ] | |
experimental: [false] | |
include: | |
- php: '7.4' | |
stability: prefer-lowest | |
- php: '8.0' | |
- php: '8.1' | |
- php: '8.2' | |
name: PHP ${{ matrix.php }} - ${{ matrix.stability }} tests | |
steps: | |
# basically git clone | |
- uses: actions/checkout@v3 | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.composer/cache/files | |
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }} | |
# use PHP of specific version | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: pcov | |
coverage: pcov | |
- name: Install dependencies | |
run: | | |
composer install --verbose --prefer-dist --no-interaction -o | |
- name: Execute tests | |
run: vendor/bin/phpunit -c ./tests/phpunit.xml.dist ./tests --verbose | |
cs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.2 | |
coverage: none # disable xdebug, pcov | |
- run: composer install --no-progress | |
- run: ./vendor/bin/phpcs --encoding=utf-8 --extensions=php --standard=./tests/phpcs.xml -nsp ./ | |