Skip to content
Draft
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
25 changes: 25 additions & 0 deletions .distignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/.git
/.github
/.lando
/.lando.yml
/.gitattributes
/.gitignore
/.editorconfig
/phpcs.xml
/.travis.yml
/.gitlab-ci.yml
/.distignore
/assets
/bin
/node_modules
/vendor
/tests
/Gruntfile.js
/package.json
/package-lock.json
/phpunit.xml.dist
/phpunit.xml
/composer.json
/composer.lock
/AGENTS.md
/.sass-cache
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
96 changes: 96 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
name: CI

on:
push:
branches: [master]
pull_request:
branches: [master]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
phpcs:
name: PHPCS
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: cs2pr

- name: Install Composer dependencies
run: composer update --no-interaction --prefer-dist

- name: Run PHPCS
run: vendor/bin/phpcs

phpunit:
name: "PHPUnit - PHP ${{ matrix.php }} / WP ${{ matrix.wp }}"
runs-on: ubuntu-latest
needs: phpcs

services:
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_ALLOW_EMPTY_PASSWORD: yes
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping --silent"
--health-interval=10s
--health-timeout=5s
--health-retries=5

strategy:
fail-fast: false
matrix:
php: ['7.4', '8.0', '8.1', '8.2', '8.3']
wp: ['latest', '6.5', '6.0']
include:
- php: '8.3'
wp: 'nightly'
- php: '8.2'
wp: 'nightly'

continue-on-error: ${{ matrix.wp == 'nightly' }}

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y subversion mysql-client

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mysqli
coverage: none

- name: Install Composer dependencies
run: composer update --no-interaction --prefer-dist

- name: Install WordPress test suite
run: bash bin/install-wp-tests.sh wordpress_test root root 127.0.0.1 ${{ matrix.wp }}

- name: Run PHPUnit
env:
WP_TESTS_PHPUNIT_POLYFILLS_PATH: ${{ github.workspace }}/vendor/yoast/phpunit-polyfills
run: vendor/bin/phpunit

- name: Run PHPUnit (multisite)
env:
WP_MULTISITE: 1
WP_TESTS_PHPUNIT_POLYFILLS_PATH: ${{ github.workspace }}/vendor/yoast/phpunit-polyfills
run: vendor/bin/phpunit
22 changes: 22 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Deploy to WordPress.org

on:
push:
tags:
- '*'

jobs:
deploy:
name: Deploy to WordPress.org SVN
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: WordPress Plugin Deploy
uses: 10up/action-wordpress-plugin-deploy@stable
env:
SVN_USERNAME: ${{ secrets.SVN_USERNAME }}
SVN_PASSWORD: ${{ secrets.SVN_PASSWORD }}
SLUG: shortcode-widget
ASSETS_DIR: assets
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.DS_Store
node_modules/
/vendor
composer.lock
/wordpress
/.idea
/profiler-output/
Loading
Loading