Skip to content

Commit

Permalink
ci: add workflow to run wp plugin checks
Browse files Browse the repository at this point in the history
  • Loading branch information
stklcode committed Sep 21, 2024
1 parent 91d3ab9 commit be902fe
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 3 deletions.
1 change: 1 addition & 0 deletions .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
/.wordpress-org
/bin
/coverage
/dist
/node_modules
/tests
/vendor
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,7 @@ jobs:
with:
node-version: '18'
- name: Install
run: |
composer install --no-interaction
npm ci
run: composer install --no-interaction

- name: Code style checks for PHP, JS and CSS
run: composer lint-all
25 changes: 25 additions & 0 deletions .github/workflows/wordpress-plugin-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Test
on: [push, pull_request]
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
tools: composer

- name: Install
run: composer install --no-interaction

- name: Package plugin
run: rsync -rc --exclude-from=.distignore ./ ./dist/ --delete --delete-excluded

- name: Check WP plugin
uses: wordpress/plugin-check-action@v1
with:
build-dir: ./dist/
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
composer.lock
coverage
css/*.min.css
dist
js/*.min.js
js/*.min.js.map
lib
Expand Down

0 comments on commit be902fe

Please sign in to comment.