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 Nov 11, 2024
1 parent 94832a4 commit 2787926
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 0 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
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
/.stylelintrc.json export-ignore
/composer.json export-ignore
/composer-php5.json export-ignore
/dist export-ignore
/package.json export-ignore
/package-lock.json export-ignore
/composer.lock export-ignore
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/wordpress-plugin-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Plugin check
on:
push:
branches: [ 'stable', 'release/*', 'backport' ]
pull_request:
branches: [ 'stable' ]
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: Build
run: composer install --no-interaction

- name: Package plugin
run: |
mkdir -p ./dist
rsync -rc --exclude-from=.distignore ./ ./dist/statify --delete --delete-excluded
- name: Check WP plugin
uses: wordpress/plugin-check-action@v1
with:
build-dir: ./dist/statify
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
.nyc_output
composer.lock
coverage
dist/
css/*.min.css
js/*.min.js
js/*.min.js.map
Expand Down

0 comments on commit 2787926

Please sign in to comment.