-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #80 from thefrosty/develop
2.7.0
- Loading branch information
Showing
18 changed files
with
428 additions
and
317 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: Main PHP Version(s) CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
pull_request: | ||
|
||
# Cancels all previous workflow runs for the same branch that have not yet completed. | ||
concurrency: | ||
# The concurrency group contains the workflow name and the branch name. | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
Test: | ||
runs-on: ${{ matrix.operating-system }} | ||
strategy: | ||
matrix: | ||
operating-system: [ ubuntu-latest ] | ||
php-versions: [ '8.0', '8.1' ] | ||
wp-versions: [ '6.1', 'latest' ] | ||
coverage: [ true ] | ||
services: | ||
mysql: | ||
image: mysql:8.0 | ||
env: | ||
MYSQL_DATABASE: wordpress_test | ||
MYSQL_PASSWORD: password | ||
MYSQL_USER: wp | ||
MYSQL_ROOT_PASSWORD: root | ||
ports: | ||
- 3306:3306 | ||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=10s --health-retries=10 | ||
|
||
name: WP ${{ matrix.wp-versions }} on PHP ${{ matrix.php-versions }} | ||
env: | ||
WORDPRESS_DB_NAME: wordpress_test | ||
WORDPRESS_DB_PASS: password | ||
WORDPRESS_DB_USER: wp | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 # No shallow clone, we need all history! | ||
|
||
- name: Setup PHP ${{ matrix.php-versions }} | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
extensions: mysql, mysqli | ||
coverage: xdebug | ||
tools: composer, cs2pr, phpunit | ||
|
||
- name: Setup WordPress ${{ matrix.wp-versions }} | ||
run: bash bin/install-wp-tests.sh wordpress_test wp password localhost ${{ matrix.wp-versions }} true | ||
|
||
- name: Install dependencies | ||
run: composer update --prefer-dist --no-interaction | ||
|
||
- name: Create all branches | ||
run: source ./vendor/thefrosty/wp-utilities/bin/create-all-branches.sh | ||
|
||
- name: Run composer tests | ||
id: tests | ||
run: composer tests | ||
env: | ||
DB_PORT: ${{ job.services.mysql.ports[3306] }} | ||
|
||
- name: Show PHPCS results in PR | ||
if: ${{ always() && steps.tests.outcome == 'failure' }} | ||
run: cs2pr ./phpcs-report.xml | ||
|
||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
fail_ci_if_error: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
.DS_Store | ||
.idea/ | ||
coverage/ | ||
.phpunit.result.cache | ||
tests/results/ | ||
tests/clover.xml | ||
vendor/ | ||
wordpress/ | ||
composer.lock | ||
phpunit.xml.bak | ||
phpcs-report.xml |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
version: '3.3' | ||
|
||
services: | ||
db: | ||
image: mysql:5.6 | ||
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci | ||
volumes: | ||
- db_data:/var/lib/mysql | ||
ports: | ||
- "3306:3306" | ||
environment: | ||
MYSQL_DATABASE: wordpress_test | ||
MYSQL_ROOT_PASSWORD: mysql_root_password | ||
MYSQL_USER: wordpress_user | ||
MYSQL_PASSWORD: mysql_password | ||
restart: always | ||
|
||
phpfpm: | ||
image: php:8.0-fpm-alpine | ||
depends_on: | ||
- db | ||
deploy: | ||
replicas: 4 | ||
environment: | ||
WORDPRESS_DB_HOST: db:3306 | ||
WORDPRESS_DB_NAME: wordpress_test | ||
WORDPRESS_DB_PASSWORD: mysql_password | ||
WORDPRESS_DB_PREFIX: wp_ | ||
WORDPRESS_DB_USER: wordpress_user | ||
restart: always | ||
|
||
volumes: | ||
db_data: |
Oops, something went wrong.