Skip to content

Commit

Permalink
Updates & maintenance (#11)
Browse files Browse the repository at this point in the history
* Update composer dependencies

* Update phpcs config

* Update GHA tests

* Update action versions

* Remove strict composer validation

* Keep yoast/phpunit-polyfills v1 for now

* Add phpcs to Tests workflow
  • Loading branch information
aaemnnosttv authored Mar 30, 2024
1 parent 8247e4e commit 344efe6
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: New tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: WordPress Plugin Deploy
uses: 10up/action-wordpress-plugin-deploy@stable
env:
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
strategy:
matrix:
php:
- 8.0
- 8.1
- 7.4
- 5.6
wp:
Expand Down Expand Up @@ -50,11 +50,13 @@ jobs:
mysql -u root -h ${DB_HOST} -e "CREATE DATABASE ${WP_DB_NAME};"
mysql -u root -h ${DB_HOST} -e "CREATE USER ${WP_DB_USER} IDENTIFIED BY '${WP_DB_PASS}';"
mysql -u root -h ${DB_HOST} -e "GRANT ALL PRIVILEGES ON ${WP_DB_NAME}.* TO ${WP_DB_USER};"
- uses: actions/checkout@v2
- run: composer validate --strict
- uses: actions/checkout@v4
- run: composer validate
- run: composer require --dev --no-update roots/wordpress:${{ matrix.wp }} wp-phpunit/wp-phpunit:${{ matrix.wp }}
- run: composer install --no-progress --no-interaction
- run: composer show
- name: Run PHPCS
run: composer lint
- name: Run PHPUnit
run: composer test
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
name: Push to master
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: WordPress.org Plugin Assets/Readme Update
uses: 10up/action-wordpress-plugin-asset-update@stable
env:
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
},
"require": {
"php": ">=5.6",
"composer/installers": "^1.0"
"composer/installers": ">=1.0"
},
"require-dev": {
"roots/wordpress": "^5",
"squizlabs/php_codesniffer": "^3.0",
"wp-phpunit/wp-phpunit": "^5",
"roots/wordpress": "^6",
"squizlabs/php_codesniffer": "^3",
"wp-phpunit/wp-phpunit": "^6",
"yoast/phpunit-polyfills": "^1"
},
"scripts": {
Expand Down
3 changes: 3 additions & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@

<!-- Ignore Composer dependencies -->
<exclude-pattern>vendor/</exclude-pattern>
<exclude-pattern>wordpress/</exclude-pattern>
<!-- Ignore Test config/bootstrap -->
<exclude-pattern>tests/*.php</exclude-pattern>

<!-- Show colors in console -->
<arg value="-colors"/>
Expand Down

0 comments on commit 344efe6

Please sign in to comment.