Extended composer.json for PHP 8.3 compatibility and added 8.3 to automated tests #41
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: Code Linter | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
# Cancels all previous workflow runs for pull requests that have not completed. | |
concurrency: | |
# The concurrency group contains the workflow name and the branch name for pull requests | |
# or the commit hash for any other events. | |
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
run: | |
name: PSR12 | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Install PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 7.3 | |
- name: Log debug information | |
run: | | |
git --version | |
php --version | |
php -i | |
composer --version | |
# This date is used to ensure that the Composer cache is refreshed at least once every week. | |
# http://man7.org/linux/man-pages/man1/date.1.html | |
- name: "Get last Monday's date" | |
id: get-date | |
run: echo "::set-output name=date::$(/bin/date -u --date='last Mon' "+%F")" | |
- name: Get Composer cache directory | |
id: composer-cache | |
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | |
- name: Cache Composer dependencies | |
uses: actions/cache@26968a09c0ea4f3e233fdddbafd1166051a095f6 # v2.1.4 | |
env: | |
cache-name: cache-composer-dependencies | |
with: | |
path: ${{ steps.composer-cache.outputs.dir }} | |
key: ${{ runner.os }}-php-7.3-date-${{ steps.get-date.outputs.date }}-composer-${{ hashFiles('**/composer.json') }} | |
- name: Install Composer dependencies | |
run: composer install | |
- name: Run PHPUnit tests | |
run: composer run lint |