Skip to content

Commit

Permalink
Merge pull request #25 from wp-graphql/fix/composer.json
Browse files Browse the repository at this point in the history
fix: composer.json fixed
  • Loading branch information
kidunot89 authored Sep 28, 2023
2 parents 19ef079 + 62d5ef4 commit 8ee80b5
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 68 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/continous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ jobs:
php-version: ${{ matrix.php }}
extensions: json, mbstring

- name: Install Codeception dependencies
run: |
composer install --ignore-platform-reqs
composer require codeception/module-asserts:* \
codeception/util-universalframework:* \
codeception/module-rest:* \
lucatume/wp-browser:^3.1 --ignore-platform-reqs
- name: Run Codeception Tests w/ Docker.
run: composer run-codeception -- -- --coverage --coverage-xml

- name: Install PHPUnit dependencies
if: ${{ matrix.php != '8.0' }}
run: |
Expand All @@ -41,17 +52,6 @@ jobs:
if: ${{ matrix.php != '8.0' }}
run: composer run-phpunit -- -- --coverage-text

- name: Install Codeception dependencies
run: |
composer install --ignore-platform-reqs
composer require codeception/module-asserts:* \
codeception/util-universalframework:* \
codeception/module-rest:* \
lucatume/wp-browser:3.1.0 --ignore-platform-reqs
- name: Run Codeception Tests w/ Docker.
run: composer run-codeception -- -- --coverage --coverage-xml

- name: Push Codecoverage to Coveralls.io
env:
COVERALLS_RUN_LOCALLY: 1
Expand Down
14 changes: 10 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@
]
},
"require": {
"php": "^7.1 || ^8.0",
"phpunit/phpunit": "^7.5 || ^8.5.0 || ^9.5"
"php": "^7.1 || ^8.0"
},
"require-dev": {
"composer/installers": "^1.9",
"johnpbloch/wordpress": "^5.4",
"wp-graphql/wp-graphql": "^1.1.8",
"simpod/php-coveralls-mirror": "^3.0",
"automattic/vipwpcs": "^2.2",
"squizlabs/php_codesniffer": "^3.5",
"automattic/vipwpcs": "^2.3",
"wp-coding-standards/wpcs": "^2.3"
},
"scripts": {
Expand All @@ -48,5 +47,12 @@
"codeception/module-rest": "Needed for \\Tests\\WPGraphQL\\TestCase\\WPGraphQLTestcase to work.",
"lucatume/wp-browser": "Needed for \\Tests\\WPGraphQL\\TestCase\\WPGraphQLTestcase to work.",
"wp-phpunit/wp-phpunit": "Needed for \\Tests\\WPGraphQL\\TestCase\\WPGraphQLUnitTestcase to work."
},
"config": {
"allow-plugins": {
"composer/installers": true,
"johnpbloch/wordpress-core-installer": true,
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
5 changes: 2 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ version: '3'
services:

mysql:
image: mysql
command: --default-authentication-plugin=mysql_native_password
image: mariadb:10.2
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: wordpress
Expand Down Expand Up @@ -32,7 +31,7 @@ services:
WP_PHPUNIT__TESTS_CONFIG: /var/www/html/wp-tests-config.php

mysql_phpunit:
image: mysql:5.7
image: mariadb:10.2
restart: always
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
Expand Down
50 changes: 0 additions & 50 deletions phpcs.xml.dist

This file was deleted.

4 changes: 4 additions & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
convertWarningsToExceptions="true"
>
<php>
<const
name="WP_TESTS_PHPUNIT_POLYFILLS_PATH"
value="vendor/yoast/phpunit-polyfills"
/>
<const
name="WP_TEST_ACTIVATED_PLUGINS"
value="wp-graphql/wp-graphql.php"
Expand Down

0 comments on commit 8ee80b5

Please sign in to comment.