This repository has been archived by the owner on Jul 23, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- updates the WPGraphQL for ACF Test environment to properly run test…
…s in Github actions when Pull Requests are opened. - Updates test for range field to assert it's a float
- Loading branch information
Showing
65 changed files
with
22,597 additions
and
7,656 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# The following files should be ignored: | ||
# - unencrypted sensitive data | ||
# - files that are not checked into the code repository | ||
# - files that are not relevant to the Docker build | ||
|
||
.git | ||
.idea | ||
bin | ||
docker-output | ||
docs | ||
img | ||
|
||
tests/_output | ||
!tests/_output/.gitignore | ||
tests/_support/_generated | ||
!tests/_support/_generated/.gitignore | ||
|
||
vendor | ||
!vendor/autoload.php | ||
!vendor/ivome/graphql-relay-php/src | ||
!vendor/webonyx/graphql-php/src | ||
!vendor/composer | ||
|
||
.dockerignore | ||
.gitignore | ||
.travis.yml | ||
CODE_OF_CONDUCT.md | ||
CONTRIBUTING.md | ||
Dockerfile* | ||
ISSUE_TEMPLATE.md | ||
LICENSE | ||
PULL_REQUEST_TEMPLATE.md | ||
README.md | ||
readme.txt | ||
run-docker*.sh |
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,23 +1,31 @@ | ||
# Shared | ||
TEST_DB_NAME="wptests" | ||
TEST_DB_HOST="127.0.0.1" | ||
TEST_DB_USER="root" | ||
TEST_DB_PASSWORD="" | ||
DB_NAME=wordpress | ||
DB_HOST=app_db | ||
DB_USER=wordpress | ||
DB_PASSWORD=wordpress | ||
WP_TABLE_PREFIX=wp_ | ||
WP_URL=http://localhost | ||
WP_DOMAIN=localhost | ||
[email protected] | ||
ADMIN_USERNAME=admin | ||
ADMIN_PASSWORD=password | ||
ADMIN_PATH=/wp-admin | ||
|
||
TEST_DB_NAME=wpgraphql_acf_tests | ||
TEST_DB_HOST=127.0.0.1 | ||
TEST_DB_USER=wordpress | ||
TEST_DB_PASSWORD=wordpress | ||
TEST_WP_TABLE_PREFIX=wp_ | ||
|
||
# Install script | ||
WP_VERSION=latest | ||
SKIP_DB_CREATE=false | ||
TEST_WP_ROOT_FOLDER=/tmp/wordpress | ||
[email protected] | ||
|
||
TESTS_DIR=tests | ||
TESTS_OUTPUT=tests/_output | ||
TESTS_DATA=tests/_data | ||
TESTS_SUPPORT=tests/_support | ||
TESTS_ENVS=tests/_envs | ||
|
||
# Codeception | ||
WP_ROOT_FOLDER="/tmp/wp-graphql-acf/wordpress" | ||
WP_ADMIN_PATH="/wp-admin" | ||
DB_NAME="wptests" | ||
DB_HOST="127.0.0.1" | ||
DB_USER="root" | ||
DB_PASSWORD="" | ||
WP_TABLE_PREFIX="wp_" | ||
WP_URL="http://wp.test" | ||
WP_DOMAIN="wp.test" | ||
ADMIN_EMAIL="[email protected]" | ||
ADMIN_USERNAME="admin" | ||
ADMIN_PASSWORD="password" | ||
CORE_BRANCH=develop | ||
SKIP_TESTS_CLEANUP=1 | ||
SUITES=wpunit |
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,46 @@ | ||
name: Coding-Standards | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
- master | ||
pull_request: | ||
branches: | ||
- develop | ||
paths: | ||
- '**.php' | ||
- '!docs/**' | ||
|
||
jobs: | ||
lint_code: | ||
runs-on: ubuntu-latest | ||
name: "Lint code with PHPCS" | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 7.3 | ||
extensions: mbstring, intl | ||
tools: composer | ||
|
||
- name: Get Composer Cache Directory | ||
id: composer-cache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Install dependencies | ||
run: | | ||
composer install | ||
- name: Cache dependencies | ||
uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: ${{ runner.os }}-composer | ||
|
||
- name: Run PHP CodeSniffer | ||
run: composer lint |
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,84 @@ | ||
name: Testing Integration | ||
|
||
on: | ||
push: | ||
branches: | ||
- develop | ||
- master | ||
pull_request: | ||
branches: | ||
- develop | ||
- master | ||
paths: | ||
- '**.php' | ||
- '!docs/**' | ||
|
||
jobs: | ||
continuous_integration: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
php: [ '7.3', '7.4' ] | ||
wordpress: [ '5.6', '5.5.3', '5.4.2' ] | ||
include: | ||
- php: '7.4' | ||
wordpress: '5.6' | ||
coverage: 1 | ||
- php: '7.4' | ||
wordpress: '5.5.3' | ||
- php: '7.4' | ||
wordpress: '5.4.2' | ||
- php: '7.3' | ||
wordpress: '5.6' | ||
- php: '7.3' | ||
wordpress: '5.5.3' | ||
- php: '7.3' | ||
wordpress: '5.4.2' | ||
fail-fast: false | ||
name: WordPress ${{ matrix.wordpress }} on PHP ${{ matrix.php }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
extensions: json, mbstring | ||
|
||
- name: Get Composer Cache Directory | ||
id: composercache | ||
run: echo "::set-output name=dir::$(composer config cache-files-dir)" | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.composercache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
|
||
- name: Install dependencies | ||
run: composer install --no-dev | ||
|
||
- name: Build "testing" Docker Image | ||
env: | ||
PHP_VERSION: ${{ matrix.php }} | ||
WP_VERSION: ${{ matrix.wordpress }} | ||
USE_XDEBUG: ${{ matrix.coverage }} | ||
run: composer build-test | ||
|
||
- name: Run Tests w/ Docker. | ||
env: | ||
COVERAGE: ${{ matrix.coverage }} | ||
USE_XDEBUG: ${{ matrix.coverage }} | ||
DEBUG: ${{ matrix.debug }} | ||
SKIP_TESTS_CLEANUP: ${{ matrix.coverage }} | ||
LOWEST: ${{ matrix.lowest }} | ||
run: composer run-test | ||
|
||
- name: Push Codecoverage to Coveralls.io | ||
if: ${{ matrix.coverage == 1 }} | ||
env: | ||
COVERALLS_RUN_LOCALLY: 1 | ||
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: vendor/bin/php-coveralls -v |
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 |
---|---|---|
|
@@ -16,3 +16,4 @@ vendor/* | |
vendor/composer/installed.json | ||
vendor/composer/*/ | ||
composer.lock | ||
.log |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.