-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add dummy test + github action runner for phpunit
- Loading branch information
Showing
4 changed files
with
89 additions
and
1 deletion.
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,32 @@ | ||
--- | ||
name: Test jobs | ||
|
||
on: | ||
- push | ||
- pull_request | ||
# Allow manually triggering the workflow. | ||
- workflow_dispatch | ||
|
||
# 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: | ||
phpunit: | ||
runs-on: ubuntu-20.04 | ||
|
||
strategy: | ||
matrix: | ||
php: ['8.0', '8.1'] | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
- uses: "ramsey/composer-install@v2" | ||
with: | ||
composer-options: --no-scripts | ||
- run: bin/phpunit |
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 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd" | ||
|
||
beStrictAboutCoversAnnotation="true" | ||
beStrictAboutOutputDuringTests="true" | ||
beStrictAboutTodoAnnotatedTests="true" | ||
bootstrap="vendor/autoload.php" | ||
cacheResultFile=".phpunit.cache/test-results" | ||
convertDeprecationsToExceptions="true" | ||
failOnRisky="true" | ||
failOnWarning="true" | ||
forceCoversAnnotation="true" | ||
verbose="true" | ||
> | ||
<testsuites> | ||
<testsuite name="all"> | ||
<directory suffix=".php">tests/</directory> | ||
</testsuite> | ||
</testsuites> | ||
|
||
<coverage processUncoveredFiles="false"> | ||
<include> | ||
<directory suffix=".php">src/</directory> | ||
</include> | ||
<report> | ||
<!-- clover outputFile="build/clover.xml"/ --> | ||
<!-- html outputDirectory="build/coverage"/ --> | ||
<text outputFile="php://stdout"/> | ||
</report> | ||
</coverage> | ||
</phpunit> |
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,20 @@ | ||
<?php | ||
/* | ||
This file is here as an example and to make sure the github actions runner has a test to run. | ||
It does not actually test anything. | ||
*/ | ||
|
||
namespace Pdsinterop\Dummy; | ||
|
||
use PHPUnit\Framework\TestCase; | ||
|
||
class DummyTest extends TestCase | ||
{ | ||
/** | ||
* @coversNothing | ||
*/ | ||
public function testDummy(): void | ||
{ | ||
$this->assertTrue(true); | ||
} | ||
} |