Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update PHPCS and PHPUnit workflows #7747

Draft
wants to merge 7 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 17 additions & 10 deletions .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: PHPCS check
name: PHPCS

permissions:
actions: read
Expand All @@ -15,20 +15,27 @@ permissions:
on:
pull_request:
push:
branches: [ master ]
branches: [master]

jobs:
phpcs:
name: PHPCS
runs-on: ubuntu-latest
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest]
php-version: ['7.2']
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: composer install --dev --prefer-dist --no-progress --no-suggest --ignore-platform-reqs
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.2'
tools: cs2pr
- name: Run phpcs
run: ./vendor/bin/phpcs -q --report=checkstyle | cs2pr
php-version: ${{ matrix.php-version }}
tools: composer:v2, cs2pr
- name: "Composer install"
run: |
composer install --dev --prefer-dist --no-progress --no-suggest
- name: PHPCS / PHP ${{ matrix.php-version }}
run: |
php -v
./vendor/bin/phpcs -q --report=checkstyle | cs2pr
12 changes: 6 additions & 6 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: PHPUnit
on:
pull_request:
push:
branches: [ master ]
branches: [master]

permissions:
actions: read
Expand Down Expand Up @@ -46,8 +46,8 @@ jobs:
extensions: memcached
- name: "Composer install"
run: |
composer install --ignore-platform-reqs
composer require doctrine/cache ~1.2 --ignore-platform-reqs
composer install
composer require doctrine/cache ~1.2
- name: PHPUnit / PHP ${{ matrix.php-version }}
run: |
php -v
Expand All @@ -59,7 +59,7 @@ jobs:
strategy:
matrix:
operating-system: [macOS-latest]
php-version: [ '7.2', '8.3' ]
php-version: ['7.2', '8.3']
steps:
- uses: actions/checkout@v2
- name: Install PHP
Expand All @@ -70,8 +70,8 @@ jobs:
extensions: memcached
- name: "Composer install"
run: |
composer install --ignore-platform-reqs
composer require doctrine/cache ~1.2 --ignore-platform-reqs
composer install
composer require doctrine/cache ~1.2
- name: PHPUnit / PHP ${{ matrix.php-version }}
run: |
php -v
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ composer.phar
.buildpath
.project
.settings
.phpunit.result.cache
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@
"exclude-from-classmap": ["Tests/"]
},
"require": {
"php": "^7.2|^8.0",
"php": "^7.2 || ^8.0",
"mustangostang/spyc": "*"
},
"require-dev": {
"phpunit/phpunit": "^8.5.8",
"phpunit/phpunit": "^8.5.8 || ^9 || ^10 || ^11",
"psr/cache": "^1.0.1",
"psr/simple-cache": "^1.0.1",
"matthiasmullie/scrapbook": "^1.4.7",
"phpstan/phpstan": "^1.10.44",
"mayflower/mo4-coding-standard": "^v9.0.0",
"symfony/yaml": "^5.1.7"
"symfony/yaml": "^5.1.7 || ^5.4 || ^6.3 || 7.0"
},
"suggest": {
"doctrine/cache": "Can directly be used for caching purpose",
Expand Down
Loading