Skip to content

Commit f7a1c57

Browse files
authored
Actions CI & PHP 8.0 (#85)
* Update Actions CI, and re-add PHP 8.0 * Drop back down to PHP 8.0 * Remove invalid with * Add `continue-on-error` to PHPUnit. * Update codecov to v4.
1 parent 0ce7ada commit f7a1c57

4 files changed

Lines changed: 20 additions & 13 deletions

File tree

.github/workflows/main.yml

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
strategy:
1919
matrix:
2020
operating-system: [ ubuntu-latest ]
21-
php-versions: [ "8.1", "8.2", "8.3" ]
21+
php-versions: [ "8.0", "8.1", "8.2", "8.3" ]
2222
wp-versions: [ 'latest' ]
2323
coverage: [ true ]
2424
services:
@@ -61,15 +61,22 @@ jobs:
6161
- name: Create all branches
6262
run: source ./vendor/thefrosty/wp-utilities/bin/create-all-branches.sh
6363

64-
- name: Run composer tests
65-
run: composer tests
66-
env:
67-
DB_PORT: ${{ job.services.mysql.ports[3306] }}
64+
- name: PHPCS
65+
run: composer phpcs
6866

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

70+
- name: PHPMD
71+
run: composer phpmd
72+
73+
- name: PHPUnit
74+
run: composer phpunit
75+
continue-on-error: true
76+
env:
77+
DB_PORT: ${{ job.services.mysql.ports[3306] }}
78+
7279
- name: Upload coverage to Codecov
73-
uses: codecov/codecov-action@v3
80+
uses: codecov/codecov-action@v4
7481
with:
7582
fail_ci_if_error: false

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,22 @@
1818
},
1919
"optimize-autoloader": true,
2020
"platform": {
21-
"php": "8.1"
21+
"php": "8.0"
2222
},
2323
"sort-packages": true
2424
},
2525
"minimum-stability": "dev",
2626
"require": {
27-
"php": "^8.1",
27+
"php": "^8.0",
2828
"ext-json": "*",
2929
"thefrosty/wp-utilities": "^3.0"
3030
},
3131
"require-dev": {
3232
"dealerdirect/phpcodesniffer-composer-installer": "^1.0",
3333
"inpsyde/php-coding-standards": "dev-development",
34-
"phpunit/php-code-coverage": "^10",
34+
"phpunit/php-code-coverage": "^9",
3535
"phpcompatibility/php-compatibility": "*",
36-
"phpunit/phpunit": "^10",
36+
"phpunit/phpunit": "^9",
3737
"roave/security-advisories": "dev-master",
3838
"roots/wordpress": "~6.5",
3939
"slevomat/coding-standard": "~8.12",

phpcs.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
<config name="ignore_warnings_on_exit" value="1"/>
2525
<!-- Sets the minimum supported WP version -->
2626
<config name="minimum_supported_wp_version" value="6.4"/>
27-
<!-- Check for cross-version support for PHP 8.1 and higher. -->
28-
<config name="testVersion" value="8.1-"/>
27+
<!-- Check for cross-version support for PHP 8.0 and higher. -->
28+
<config name="testVersion" value="8.0-"/>
2929

3030
<rule ref="WordPress-Docs">
3131
<exclude name="Generic.Commenting.DocComment.SpacingBeforeTags"/>

phpunit.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
</php>
1313
<testsuites>
1414
<testsuite name="unit">
15-
<directory phpVersion="8.1" phpVersionOperator=">=" suffix="Test.php">./tests/unit</directory>
15+
<directory phpVersion="8.0" phpVersionOperator=">=" suffix="Test.php">./tests/unit</directory>
1616
</testsuite>
1717
</testsuites>
1818

0 commit comments

Comments
 (0)