Skip to content

Commit 55e1849

Browse files
committed
fix on readme and quality workflow
1 parent 59107fc commit 55e1849

File tree

7 files changed

+148
-2
lines changed

7 files changed

+148
-2
lines changed

.github/workflows/infection.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Mutations
2+
on: push
3+
jobs:
4+
infection:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v3
8+
- uses: shivammathur/setup-php@v2
9+
with:
10+
php-version: '8.2'
11+
tools: composer:v2
12+
coverage: pcov
13+
- uses: actions/cache@v3
14+
with:
15+
path: '**/vendor'
16+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
17+
restore-keys: |
18+
${{ runner.os }}-composer-
19+
- uses: php-actions/composer@v6
20+
with:
21+
args: --prefer-dist
22+
php_version: '8.2'
23+
24+
- name: Infection
25+
run: |
26+
wget -q https://github.com/infection/infection/releases/download/0.26.18/infection.phar
27+
wget -q https://github.com/infection/infection/releases/download/0.26.18/infection.phar.asc
28+
chmod +x infection.phar
29+
./infection.phar
30+
31+
- name: Store infection log
32+
uses: actions/upload-artifact@v3
33+
with:
34+
path: infection.log

.github/workflows/phpstan-5.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: PHPStan level 5
2+
on: push
3+
jobs:
4+
phpstan:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v3
8+
- uses: actions/cache@v3
9+
with:
10+
path: '**/vendor'
11+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
12+
restore-keys: |
13+
${{ runner.os }}-composer-
14+
- uses: php-actions/composer@v6
15+
with:
16+
args: --prefer-dist
17+
php_version: '8.2'
18+
19+
- name: PHPStan
20+
uses: php-actions/phpstan@v3
21+
with:
22+
path: src/
23+
level: 5
24+
php_version: '8.2'

.github/workflows/phpunit.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: PHPUnit
2+
on: push
3+
jobs:
4+
phpunit:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v3
8+
- uses: shivammathur/setup-php@v2
9+
with:
10+
php-version: '8.2'
11+
tools: composer:v2
12+
coverage: pcov
13+
- uses: actions/cache@v3
14+
with:
15+
path: '**/vendor'
16+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
17+
restore-keys: |
18+
${{ runner.os }}-composer-
19+
- uses: php-actions/composer@v6
20+
with:
21+
args: --prefer-dist
22+
php_version: '8.2'
23+
24+
- name: Run tests & generate Coverage
25+
run: bin/phpunit functional --coverage-html var/coverage
26+
27+
- name: Store coverage files
28+
uses: actions/upload-artifact@v3
29+
with:
30+
path: var/coverage

.github/workflows/quality.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Quality (PHPStan level 5)
1+
name: Quality (PHPStan level 4)
22
on: push
33
jobs:
44
cs-fixer:
@@ -34,5 +34,5 @@ jobs:
3434
uses: php-actions/phpstan@v3
3535
with:
3636
path: src/
37-
level: 5
37+
level: 4
3838
php_version: '8.2'

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@ This package brings interfaces for the pipeline component, aimed at providing an
55
with logging, line rejections and execution states.
66

77

8+
[![Mutations](https://github.com/php-etl/pipeline-contracts/actions/workflows/infection.yaml/badge.svg)](https://github.com/php-etl/pipeline-contracts/actions/workflows/infection.yaml)
9+
[![PHPUnit](https://github.com/php-etl/pipeline-contracts/actions/workflows/phpunit.yaml/badge.svg)](https://github.com/php-etl/pipeline-contracts/actions/workflows/phpunit.yaml)
810
[![Quality](https://github.com/php-etl/pipeline-contracts/actions/workflows/quality.yaml/badge.svg)](https://github.com/php-etl/pipeline-contracts/actions/workflows/quality.yaml)
911
[![PHPStan level 5](https://github.com/php-etl/pipeline-contracts/actions/workflows/phpstan-5.yaml/badge.svg)](https://github.com/php-etl/pipeline-contracts/actions/workflows/phpstan-5.yaml)
12+
[![PHPStan level 6](https://github.com/php-etl/pipeline-contracts/actions/workflows/phpstan-6.yaml/badge.svg)](https://github.com/php-etl/pipeline-contracts/actions/workflows/phpstan-6.yaml)
1013
[![PHPStan level 7](https://github.com/php-etl/pipeline-contracts/actions/workflows/phpstan-7.yaml/badge.svg)](https://github.com/php-etl/pipeline-contracts/actions/workflows/phpstan-7.yaml)
1114
[![PHPStan level 8](https://github.com/php-etl/pipeline-contracts/actions/workflows/phpstan-8.yaml/badge.svg)](https://github.com/php-etl/pipeline-contracts/actions/workflows/phpstan-8.yaml)
1215
![PHP](https://img.shields.io/packagist/php-v/php-etl/pipeline-contracts)

infection.json.dist

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"source": {
3+
"directories": [
4+
"src"
5+
]
6+
},
7+
"timeout": 10,
8+
"logs": {
9+
"text": "infection.log",
10+
"summary": "summary.log",
11+
"json": "infection-log.json",
12+
"perMutator": "per-mutator.md"
13+
},
14+
"phpUnit": {
15+
"configDir": "."
16+
},
17+
"mutators": {
18+
"@default": true
19+
},
20+
"testFramework":"phpunit",
21+
"minMsi": 60,
22+
"minCoveredMsi": 70
23+
}

phpunit.xml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<?xml version="1.0"?>
2+
<phpunit
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd"
5+
backupGlobals="true"
6+
colors="false"
7+
processIsolation="false"
8+
stopOnError="false"
9+
stopOnFailure="false"
10+
stopOnIncomplete="false"
11+
stopOnSkipped="false"
12+
stopOnRisky="false"
13+
timeoutForSmallTests="1"
14+
timeoutForMediumTests="10"
15+
timeoutForLargeTests="60"
16+
cacheDirectory=".phpunit.cache"
17+
backupStaticProperties="false"
18+
requireCoverageMetadata="false">
19+
<testsuites>
20+
<testsuite name="Functional tests">
21+
<directory>tests/functional/</directory>
22+
</testsuite>
23+
</testsuites>
24+
<coverage>
25+
<include>
26+
<directory suffix=".php">src</directory>
27+
</include>
28+
</coverage>
29+
<php>
30+
<ini name="allow_url_include" value="1" />
31+
</php>
32+
</phpunit>

0 commit comments

Comments
 (0)