Skip to content

Composer 2 inclusion #26

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

Merged
merged 8 commits into from
Dec 18, 2023
Merged
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
41 changes: 41 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Run PHP tests

on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]

permissions:
contents: read

jobs:
run-test:
runs-on: ubuntu-22.04

strategy:
matrix:
php: [7.4, 8.0, 8.1, 8.2, 8.3]
# dependency-version: [prefer-lowest, prefer-stable]
dependency-version: [prefer-stable]

name: PHP${{ matrix.php }}_${{ matrix.dependency-version }}

steps:
- uses: actions/checkout@v3

- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug

- name: Install dependencies
run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest

- name: Check coding style
run: vendor/bin/phpcs -s --standard=phpcs.ruleset.xml .

- name: Execute tests
run: vendor/bin/phpunit

# TODO: add codecoverage // vendor/bin/phpunit --coverage-clover logs/clover.xml
41 changes: 13 additions & 28 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,17 @@
# language: php

filter:
paths: [lib/*]
excluded_paths: [tests/*, vendor/*]

before_commands:
- 'composer self-update'
- 'composer update --prefer-stable --prefer-source --no-interaction --no-scripts --no-progress --no-suggest'
excluded_paths:
- 'tests/'

tools:
php_code_coverage: false
php_code_sniffer:
enabled: true
config:
standard: 'PSR2'
filter:
paths: [lib/*, tests/*]
php_mess_detector:
enabled: true
config:
ruleset: 'unusedcode,naming,design,controversial,codesize'
php_cpd: true
php_loc: true
php_pdepend: true
php_analyzer: true
sensiolabs_security_checker: true
build:
image: default-jammy
environment:
php: 8.1
nodes:
analysis:
tests:
override:
- php-scrutinizer-run
- phpcs-run --standard=phpcs.ruleset.xml

checks:
php:
custom_coding_standard:
ruleset_path: phpcs.ruleset.xml
php: true
54 changes: 0 additions & 54 deletions .travis.yml

This file was deleted.

13 changes: 9 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,22 @@
}
],
"require": {
"composer/installers": "~1.0"
"composer/installers": "~1.0 || ~2.0"
},
"require-dev": {
"phpunit/phpunit": "^5.6",
"brain/monkey": "1.*",
"squizlabs/php_codesniffer": "~2.0"
"phpunit/phpunit": "^9.6",
"brain/monkey": "^2.6",
"squizlabs/php_codesniffer": "^3.7"
},
"type": "wordpress-plugin",
"autoload": {
"psr-4": {
"ACFComposer\\": "lib/ACFComposer"
}
},
"config": {
"allow-plugins": {
"composer/installers": true
}
}
}
Loading