Skip to content

Commit 0fd1f24

Browse files
committed
Tune pipeline
1 parent 336247c commit 0fd1f24

File tree

4 files changed

+44
-3
lines changed

4 files changed

+44
-3
lines changed

.github/workflows/build.yml

+15
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,18 @@ jobs:
4949

5050
- name: Run tests
5151
run: composer test
52+
53+
- name: Run Infection
54+
run: composer infection
55+
env:
56+
INFECTION_DASHBOARD_API_KEY: ${{ secrets.INFECTION_DASHBOARD_API_KEY }}
57+
58+
- name: Upload coverage to Codecov.io
59+
run: bash <(curl -s https://codecov.io/bash -s "build/logs")
60+
continue-on-error: true
61+
62+
- name: Upload coverage to Scrutinizer
63+
uses: sudo-bot/action-scrutinizer@latest
64+
with:
65+
cli-args: --format=php-clover build/logs/clover.xml
66+
continue-on-error: true

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![Build](https://github.com/remorhaz/php-json-pointer/actions/workflows/build.yml/badge.svg)](https://github.com/remorhaz/php-json-pointer/actions/workflows/build.yml)
55
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/remorhaz/php-json-pointer/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/remorhaz/php-json-pointer/?branch=master)
66
[![codecov](https://codecov.io/gh/remorhaz/php-json-pointer/branch/master/graph/badge.svg)](https://codecov.io/gh/remorhaz/php-json-pointer)
7-
[![Infection MSI](https://badge.stryker-mutator.io/github.com/remorhaz/php-json-pointer/master)](https://infection.github.io)
7+
[![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fremorhaz%2Fphp-json-pointer%2Fmaster)](https://dashboard.stryker-mutator.io/reports/github.com/remorhaz/php-json-pointer/master)
88
[![Total Downloads](https://poser.pugx.org/remorhaz/php-json-pointer/downloads)](https://packagist.org/packages/remorhaz/php-json-pointer)
99
[![License](https://poser.pugx.org/remorhaz/php-json-pointer/license)](https://packagist.org/packages/remorhaz/php-json-pointer)
1010

infection.json.dist

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"text": "build/logs/infection/infection.log",
1010
"summary": "build/logs/infection/summary.log",
1111
"perMutator": "build/logs/infection/per-mutator.md",
12-
"badge": {
13-
"branch": "master"
12+
"stryker": {
13+
"badge": "/^master$/"
1414
}
1515
}
1616
}

tests/Parser/Ll1ParserFactoryTest.php

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace Remorhaz\JSON\Pointer\Test\Parser;
6+
7+
use PHPUnit\Framework\Attributes\CoversClass;
8+
use PHPUnit\Framework\TestCase;
9+
use Remorhaz\JSON\Pointer\Locator\LocatorBuilderInterface;
10+
use Remorhaz\JSON\Pointer\Parser\Ll1ParserFactory;
11+
12+
#[CoversClass(Ll1ParserFactory::class)]
13+
class Ll1ParserFactoryTest extends TestCase
14+
{
15+
public function testCreateParser_GivenSourceAndLocatorBuilder_ResultAddsMatchingReferenceToSameBuilder(): void
16+
{
17+
$factory = new Ll1ParserFactory();
18+
$locatorBuilder = $this->createMock(LocatorBuilderInterface::class);
19+
$parser = $factory->createParser('/1', $locatorBuilder);
20+
$locatorBuilder
21+
->expects(self::atLeastOnce())
22+
->method('addReference')
23+
->with(self::identicalTo('1'));
24+
$parser->run();
25+
}
26+
}

0 commit comments

Comments
 (0)