File tree 4 files changed +89
-1
lines changed
4 files changed +89
-1
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ name : Test jobs
3
+
4
+ on :
5
+ - push
6
+ - pull_request
7
+ # Allow manually triggering the workflow.
8
+ - workflow_dispatch
9
+
10
+ # Cancels all previous workflow runs for the same branch that have not yet completed.
11
+ concurrency :
12
+ # The concurrency group contains the workflow name and the branch name.
13
+ group : ${{ github.workflow }}-${{ github.ref }}
14
+ cancel-in-progress : true
15
+
16
+ jobs :
17
+ phpunit :
18
+ runs-on : ubuntu-20.04
19
+
20
+ strategy :
21
+ matrix :
22
+ php : ['8.0', '8.1']
23
+
24
+ steps :
25
+ - uses : actions/checkout@v3
26
+ - uses : shivammathur/setup-php@v2
27
+ with :
28
+ php-version : ${{ matrix.php }}
29
+ - uses : " ramsey/composer-install@v2"
30
+ with :
31
+ composer-options : --no-scripts
32
+ - run : bin/phpunit
Original file line number Diff line number Diff line change 36
36
"dev:example" : " Run internal PHP development server with example code" ,
37
37
"tests:unit" : " Run unit-test with PHPUnit"
38
38
},
39
- "type" : " library"
39
+ "type" : " library" ,
40
+ "require-dev" : {
41
+ "phpunit/phpunit" : " ^9"
42
+ }
40
43
}
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <phpunit
3
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4
+ xsi : noNamespaceSchemaLocation =" ./vendor/phpunit/phpunit/phpunit.xsd"
5
+
6
+ beStrictAboutCoversAnnotation =" true"
7
+ beStrictAboutOutputDuringTests =" true"
8
+ beStrictAboutTodoAnnotatedTests =" true"
9
+ bootstrap =" vendor/autoload.php"
10
+ cacheResultFile =" .phpunit.cache/test-results"
11
+ convertDeprecationsToExceptions =" true"
12
+ failOnRisky =" true"
13
+ failOnWarning =" true"
14
+ forceCoversAnnotation =" true"
15
+ verbose =" true"
16
+ >
17
+ <testsuites >
18
+ <testsuite name =" all" >
19
+ <directory suffix =" .php" >tests/</directory >
20
+ </testsuite >
21
+ </testsuites >
22
+
23
+ <coverage processUncoveredFiles =" false" >
24
+ <include >
25
+ <directory suffix =" .php" >src/</directory >
26
+ </include >
27
+ <report >
28
+ <!-- clover outputFile="build/clover.xml"/ -->
29
+ <!-- html outputDirectory="build/coverage"/ -->
30
+ <text outputFile =" php://stdout" />
31
+ </report >
32
+ </coverage >
33
+ </phpunit >
Original file line number Diff line number Diff line change
1
+ <?php
2
+ /*
3
+ This file is here as an example and to make sure the github actions runner has a test to run.
4
+ It does not actually test anything.
5
+ */
6
+
7
+ namespace Pdsinterop \Dummy ;
8
+
9
+ use PHPUnit \Framework \TestCase ;
10
+
11
+ class DummyTest extends TestCase
12
+ {
13
+ /**
14
+ * @coversNothing
15
+ */
16
+ public function testDummy (): void
17
+ {
18
+ $ this ->assertTrue (true );
19
+ }
20
+ }
You can’t perform that action at this time.
0 commit comments