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 10 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
29 changes: 18 additions & 11 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.os }}
strategy:
matrix:
os: [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
- name: Setup PHP
- uses: actions/checkout@v4
- name: Install 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
6 changes: 3 additions & 3 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 @@ -48,8 +48,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
10 changes: 5 additions & 5 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",
"psr/cache": "^1.0.1",
"psr/simple-cache": "^1.0.1",
"phpunit/phpunit": "^8.5.8 || ^9 || ^10 || ^11",
"psr/cache": "^1.0.1 || ^2.0 || ^3.0",
"psr/simple-cache": "^1.0.1 || ^2.0 || ^3.0",
"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