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

Actions CI & PHP 8.0 #85

Merged
merged 5 commits into from
Apr 24, 2024
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
19 changes: 13 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
matrix:
operating-system: [ ubuntu-latest ]
php-versions: [ "8.1", "8.2", "8.3" ]
php-versions: [ "8.0", "8.1", "8.2", "8.3" ]
wp-versions: [ 'latest' ]
coverage: [ true ]
services:
Expand Down Expand Up @@ -61,15 +61,22 @@ jobs:
- name: Create all branches
run: source ./vendor/thefrosty/wp-utilities/bin/create-all-branches.sh

- name: Run composer tests
run: composer tests
env:
DB_PORT: ${{ job.services.mysql.ports[3306] }}
- name: PHPCS
run: composer phpcs

- name: Show PHPCS results in PR
run: cs2pr ./phpcs-report.xml

- name: PHPMD
run: composer phpmd

- name: PHPUnit
run: composer phpunit
continue-on-error: true
env:
DB_PORT: ${{ job.services.mysql.ports[3306] }}

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: false
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,22 @@
},
"optimize-autoloader": true,
"platform": {
"php": "8.1"
"php": "8.0"
},
"sort-packages": true
},
"minimum-stability": "dev",
"require": {
"php": "^8.1",
"php": "^8.0",
"ext-json": "*",
"thefrosty/wp-utilities": "^3.0"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
"inpsyde/php-coding-standards": "dev-development",
"phpunit/php-code-coverage": "^10",
"phpunit/php-code-coverage": "^9",
"phpcompatibility/php-compatibility": "*",
"phpunit/phpunit": "^10",
"phpunit/phpunit": "^9",
"roave/security-advisories": "dev-master",
"roots/wordpress": "~6.5",
"slevomat/coding-standard": "~8.12",
Expand Down
4 changes: 2 additions & 2 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
<config name="ignore_warnings_on_exit" value="1"/>
<!-- Sets the minimum supported WP version -->
<config name="minimum_supported_wp_version" value="6.4"/>
<!-- Check for cross-version support for PHP 8.1 and higher. -->
<config name="testVersion" value="8.1-"/>
<!-- Check for cross-version support for PHP 8.0 and higher. -->
<config name="testVersion" value="8.0-"/>

<rule ref="WordPress-Docs">
<exclude name="Generic.Commenting.DocComment.SpacingBeforeTags"/>
Expand Down
2 changes: 1 addition & 1 deletion phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</php>
<testsuites>
<testsuite name="unit">
<directory phpVersion="8.1" phpVersionOperator=">=" suffix="Test.php">./tests/unit</directory>
<directory phpVersion="8.0" phpVersionOperator=">=" suffix="Test.php">./tests/unit</directory>
</testsuite>
</testsuites>

Expand Down
Loading