Skip to content

Commit

Permalink
Merge pull request #50 from asdfdotdev/development
Browse files Browse the repository at this point in the history
WordPress v5.6 Updates
  • Loading branch information
chrislarrycarl authored Dec 27, 2020
2 parents 8d2eb5f + d8352e6 commit 6a5986f
Show file tree
Hide file tree
Showing 23 changed files with 2,883 additions and 2,235 deletions.
1 change: 0 additions & 1 deletion .github/FUNDING.yml

This file was deleted.

File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions .github/funding.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
custom: https://asdf.dev/support
File renamed without changes.
File renamed without changes.
File renamed without changes.
81 changes: 81 additions & 0 deletions .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Code Coverage

on:
push:
branches:
- main
- development
pull_request:
branches:
types: [closed]
schedule:
- cron: '0 0 * * 0'

jobs:
code-coverage:
name: WordPress ${{ matrix.wordpress-versions }} - PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
services:
mysql-service:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
strategy:
matrix:
php-versions: [ '7.4' ]
wordpress-versions: [ '5.6' ]
operating-system: [ ubuntu-20.04 ]
env:
UTMDC_BITLY_API: ${{secrets.UTMDC_BITLY_API}}
UTMDC_REBRANDLY_API: ${{secrets.UTMDC_REBRANDLY_API}}
UTMDC_PLUGIN_DIR: ${{secrets.UTMDC_PLUGIN_DIR}}

steps:
- name: Start MySQL
run: sudo /etc/init.d/mysql start

- name: Setup PHP
# Commit hash for v2.9.0: https://github.com/shivammathur/setup-php/releases/tag/2.9.0
uses: shivammathur/setup-php@50980172517227701a2db688415a86573987b6df
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring
ini-values: post_max_size=256M, max_execution_time=180
coverage: xdebug

- name: Log Debug Information
run: |
echo "$GITHUB_REF"
echo "$GITHUB_EVENT_NAME"
php --version
mysql --version
- name: Checkout utm.codes
uses: actions/checkout@v2
with:
fetch-depth: 1

- name: Install PHPUnit
run: |
composer require phpunit/phpunit:^7 --update-with-dependencies
- name: Install WordPress
run: |
bash _test/bin/install-wp-tests.sh wordpress_test root root localhost:3306 ${{ matrix.wordpress-versions }}
- name: Generate Coverage Report
run: |
cd _test
mkdir -p build/logs
../vendor/bin/phpunit
- name: Upload coverage to Codecov
run: |
bash <(curl -s https://codecov.io/bash)
60 changes: 60 additions & 0 deletions .github/workflows/code-styles.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Code Styles

on:
push:
branches:
- main
- development
pull_request:
branches:
types: [closed]
schedule:
- cron: '0 0 * * 0'

jobs:
code-styles:
name: WordPress ${{ matrix.wordpress-versions }} - PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
php-versions: [ '7.4' ]
wordpress-versions: [ '5.6' ]
operating-system: [ ubuntu-20.04 ]

steps:
- name: Setup PHP
# Commit hash for v2.9.0: https://github.com/shivammathur/setup-php/releases/tag/2.9.0
uses: shivammathur/setup-php@50980172517227701a2db688415a86573987b6df
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring
ini-values: post_max_size=256M, max_execution_time=180
coverage: xdebug

- name: Checkout utm.codes
uses: actions/checkout@v2

- name: Setup PHPCS
run: |
composer install
./vendor/bin/phpcs --config-set ignore_warnings_on_exit 1
./vendor/bin/phpcs --config-set ignore_errors_on_exit 1
./vendor/bin/phpcs --config-set show_progress 1
./vendor/bin/phpcs --config-set colors 1
- name: Log Debug Information
run: |
echo "$GITHUB_REF"
echo "$GITHUB_EVENT_NAME"
php --version
mysql --version
./vendor/bin/phpcs --version
./vendor/bin/phpcs -i
- name: PHP Compatibility
run: |
./vendor/bin/phpcs --standard=PHPCompatibility -p --runtime-set testVersion 5.6- ./index.php ./utm-dot-codes.php ./classes
- name: WordPress Code Standards
run: |
./vendor/bin/phpcs --standard=WordPress --report=summary ./index.php ./utm-dot-codes.php ./classes
76 changes: 76 additions & 0 deletions .github/workflows/phpunit-tests-7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: PHPUnit Tests (7.x)

on:
push:
branches:
- main
- development
pull_request:
branches:
types: [closed]
schedule:
- cron: '0 0 * * 0'

jobs:
test-php:
name: WordPress ${{ matrix.wordpress-versions }} - PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
services:
mysql-service:
image: mysql:5.7
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
strategy:
matrix:
php-versions: [ '7.4', '7.3' ]
wordpress-versions: [ 'nightly', '5.6', '5.5', '5.4' ]
operating-system: [ ubuntu-18.04 ]
env:
UTMDC_BITLY_API: ${{secrets.UTMDC_BITLY_API}}
UTMDC_REBRANDLY_API: ${{secrets.UTMDC_REBRANDLY_API}}
UTMDC_PLUGIN_DIR: ${{secrets.UTMDC_PLUGIN_DIR}}

steps:
- name: Start MySQL
run: sudo /etc/init.d/mysql start

- name: Setup PHP
# Commit hash for v2.9.0: https://github.com/shivammathur/setup-php/releases/tag/2.9.0
uses: shivammathur/setup-php@50980172517227701a2db688415a86573987b6df
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring
ini-values: post_max_size=256M, max_execution_time=180
coverage: xdebug

- name: Log Debug Information
run: |
echo "$GITHUB_REF"
echo "$GITHUB_EVENT_NAME"
php --version
mysql --version
- name: Checkout utm.codes
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Install PHPUnit
run: |
composer require phpunit/phpunit:^7 --update-with-dependencies
- name: Install WordPress
run: |
bash _test/bin/install-wp-tests.sh wordpress_test root root localhost:3306 ${{ matrix.wordpress-versions }}
- name: Run PHPUnit Tests
run: |
cd _test
../vendor/bin/phpunit
76 changes: 76 additions & 0 deletions .github/workflows/phpunit-tests-legacy-56.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: PHPUnit Tests (Legacy 5.6)

on:
push:
branches:
- main
- development
pull_request:
branches:
types: [closed]
schedule:
- cron: '0 0 * * 0'

jobs:
test-php:
name: WordPress ${{ matrix.wordpress-versions }} - PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
services:
mysql-service:
image: mysql:5.6
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
strategy:
matrix:
php-versions: [ '5.6' ]
wordpress-versions: [ 'nightly', '4.9', '4.8', '4.7' ]
operating-system: [ ubuntu-16.04 ]
env:
UTMDC_BITLY_API: ${{secrets.UTMDC_BITLY_API}}
UTMDC_REBRANDLY_API: ${{secrets.UTMDC_REBRANDLY_API}}
UTMDC_PLUGIN_DIR: ${{secrets.UTMDC_PLUGIN_DIR}}

steps:
- name: Start MySQL
run: sudo /etc/init.d/mysql start

- name: Setup PHP
# Commit hash for v2.9.0: https://github.com/shivammathur/setup-php/releases/tag/2.9.0
uses: shivammathur/setup-php@50980172517227701a2db688415a86573987b6df
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring
ini-values: post_max_size=256M, max_execution_time=180
coverage: xdebug

- name: Log Debug Information
run: |
echo "$GITHUB_REF"
echo "$GITHUB_EVENT_NAME"
php --version
mysql --version
- name: Checkout utm.codes
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Install PHPUnit
run: |
composer require phpunit/phpunit:^5 --update-with-dependencies
- name: Install WordPress
run: |
bash _test/bin/install-wp-tests.sh wordpress_test root root localhost:3306 ${{ matrix.wordpress-versions }}
- name: Run PHPUnit Tests
run: |
cd _test
../vendor/bin/phpunit
77 changes: 77 additions & 0 deletions .github/workflows/phpunit-tests-legacy-7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
name: PHPUnit Tests (Legacy 7.x)

on:
push:
branches:
- main
- development
pull_request:
branches:
types: [closed]
schedule:
- cron: '0 0 * * 0'

jobs:
test-php:
name: WordPress ${{ matrix.wordpress-versions }} - PHP ${{ matrix.php-versions }} on ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
services:
mysql-service:
image: mysql:5.6
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
strategy:
matrix:
php-versions: [ '7.2', '7.1', '7.0' ]
wordpress-versions: [ 'nightly', '5.3', '5.2', '5.1', '5.0' ]
operating-system: [ ubuntu-18.04 ]
env:
UTMDC_BITLY_API: ${{secrets.UTMDC_BITLY_API}}
UTMDC_REBRANDLY_API: ${{secrets.UTMDC_REBRANDLY_API}}
UTMDC_PLUGIN_DIR: ${{secrets.UTMDC_PLUGIN_DIR}}

steps:
- name: Start MySQL
run: sudo /etc/init.d/mysql start

- name: Setup PHP
# Commit hash for v2.9.0: https://github.com/shivammathur/setup-php/releases/tag/2.9.0
uses: shivammathur/setup-php@50980172517227701a2db688415a86573987b6df
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, mysqli
ini-values: post_max_size=256M, max_execution_time=180
coverage: xdebug

- name: Log Debug Information
run: |
echo "$GITHUB_REF"
echo "$GITHUB_EVENT_NAME"
echo "WordPress $WORDPRESS_VERSION"
php --version
mysql --version
- name: Checkout utm.codes
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Install PHPUnit
run: |
composer require phpunit/phpunit:^6 --update-with-dependencies
- name: Install WordPress
run: |
bash _test/bin/install-wp-tests.sh wordpress_test root root localhost:3306 ${{ matrix.wordpress-versions }}
- name: Run PHPUnit Tests
run: |
cd _test
../vendor/bin/phpunit
Loading

0 comments on commit 6a5986f

Please sign in to comment.