Skip to content

Commit 10b2056

Browse files
authored
testing PR (#12)
* testing PR * update phpunit config * trying something
1 parent 57e184b commit 10b2056

File tree

3 files changed

+29
-15
lines changed

3 files changed

+29
-15
lines changed

.github/workflows/test.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,25 @@ jobs:
4444
uses: actions/upload-artifact@v3
4545
with:
4646
name: phpunit-${{ matrix.deps }}-${{ matrix.php-version }}.coverage
47-
path: coverage.xml
47+
path: coverage.xml
48+
upload_coverage:
49+
name: Upload coverage to Codecov
50+
runs-on: ubuntu-20.04
51+
needs:
52+
- phpunit
53+
54+
steps:
55+
- name: Checkout
56+
uses: actions/checkout@v3
57+
with:
58+
fetch-depth: 2
59+
60+
- name: Download coverage files
61+
uses: actions/download-artifact@v3
62+
with:
63+
path: reports
64+
65+
- name: Upload to Codecov
66+
uses: codecov/codecov-action@v3
67+
with:
68+
directory: reports

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
[![Coverage Status](https://codecov.io/gh/shmax/graphql-php-validation-toolkit/branch/master/graph/badge.svg)](https://codecov.io/gh/shmax/graphql-php-validation-toolkit/branch/master)
55
[![Latest Stable Version](https://poser.pugx.org/shmax/graphql-php-validation-toolkit/version)](https://packagist.org/packages/shmax/graphql-php-validation-toolkit)
66

7+
78
GraphQL is great when it comes to validating types and checking syntax, but isn't much help when it comes to providing additional validation on user input. The authors of GraphQL have generally opined that the correct response to bad user input is not to throw an exception, but rather to return any validation feedback along with the result.
89

910
As Lee Byron explains [here](https://github.com/facebook/graphql/issues/117#issuecomment-170180628):

phpunit.xml.dist

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,17 @@
44
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
55
bootstrap="tests/bootstrap.php"
66
>
7+
<coverage>
8+
<include>
9+
<directory suffix=".php">./src</directory>
10+
</include>
11+
</coverage>
712
<php>
813
<ini name="error_reporting" value="E_ALL"/>
914
</php>
10-
1115
<testsuites>
12-
<testsuite name="webonyx/graphql-php Test Suite">
16+
<testsuite name="shmax/graphql-php-validation-toolkit Test Suite">
1317
<directory>./tests/</directory>
1418
</testsuite>
1519
</testsuites>
16-
17-
<groups>
18-
<exclude>
19-
<group>ReactPromise</group>
20-
</exclude>
21-
</groups>
22-
23-
<filter>
24-
<whitelist>
25-
<directory suffix=".php">./src</directory>
26-
</whitelist>
27-
</filter>
2820
</phpunit>

0 commit comments

Comments
 (0)