Skip to content

Commit 5a4716c

Browse files
authored
Introudce historian to CI (#1106)
* Introudce historian to CI * Fix quoting and incidental CS fixing
1 parent a3e1ef0 commit 5a4716c

3 files changed

Lines changed: 37 additions & 14 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,12 +219,36 @@ jobs:
219219
run: php --version
220220

221221
- name: "Run tests with PHPUnit"
222-
run: vendor/bin/phpunit
222+
run: "vendor/bin/phpunit --log-junit phpunit-${{ matrix.php-version }}-${{ matrix.dependency }}.xml"
223223
env:
224224
SKIP_XDEBUG_TESTS: "${{ matrix.skip_xdebug_tests }}"
225+
-
226+
name: "Upload to Historian"
227+
run: |
228+
curl http://${{ secrets.HISTORIAN_HOST }}/api/upload -XPOST \
229+
-H"X-Api-Key: ${{ secrets.HISTORIAN_API_KEY }}" \
230+
-H"X-Build: ${{ github.run_number }}" \
231+
-H"X-Commit-Sh: ${{ github.sha }}" \
232+
-H"X-Commit-Message: ${{ github.event.head_commit.message }}" \
233+
-H"X-Author-Name: ${{ github.event.head_commit.author.name }}" \
234+
-H"X-Author-Email: ${{ github.event.head_commit.author.email }}" \
235+
-H"X-Host: ${{ runner.name }}" \
236+
-F"phpunit=@phpunit-${{ matrix.php-version }}-${{ matrix.dependency }}.xml"
225237
226238
- name: "Run benchmarks with PHPBench"
227-
run: bin/phpbench run --report=env --progress=dots
239+
run: "bin/phpbench run --report=env --progress=dots --dump-file=phpbench-${{ matrix.php-version }}-${{ matrix.dependency }}.xml"
240+
-
241+
name: "Upload to Historian"
242+
run: |
243+
curl http://${{ secrets.HISTORIAN_HOST }}/api/upload -XPOST \
244+
-H"X-Api-Key: ${{ secrets.HISTORIAN_API_KEY }}" \
245+
-H"X-Build: ${{ github.run_number }}" \
246+
-H"X-Commit-Sh: ${{ github.sha }}" \
247+
-H"X-Commit-Message: ${{ github.event.head_commit.message }}" \
248+
-H"X-Author-Name: ${{ github.event.head_commit.author.name }}" \
249+
-H"X-Author-Email: ${{ github.event.head_commit.author.email }}" \
250+
-H"X-Host: ${{ runner.name }}" \
251+
-Fphpbench=@phpbench-${{ matrix.php-version }}-${{ matrix.dependency }}.xml
228252
229253
- if: matrix.with-examples == 'yes'
230254
run: bin/phpbench run --profile=examples --report=env --progress=dots --iterations=1 --revs=1

lib/Console/CharacterReader.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ private static function initialize(): void
3434
/**
3535
* Wait for a single character input and return it.
3636
*
37-
* @return ?string
3837
*/
3938
public function read(): ?string
4039
{

lib/Storage/HistoryEntry.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,18 @@ class HistoryEntry
3434
* @param int|float $totalTime
3535
*/
3636
public function __construct(
37-
private $runId,
37+
private $runId,
3838
private readonly DateTime $date,
39-
private $tag,
40-
private $branch,
41-
private $nbSubjects,
42-
private $nbIterations,
43-
private $nbRevolutions,
44-
private $minTime,
45-
private $maxTime,
46-
private $meanTime,
47-
private $meanRelStDev,
48-
private $totalTime
39+
private $tag,
40+
private $branch,
41+
private $nbSubjects,
42+
private $nbIterations,
43+
private $nbRevolutions,
44+
private $minTime,
45+
private $maxTime,
46+
private $meanTime,
47+
private $meanRelStDev,
48+
private $totalTime
4949
) {
5050
}
5151

0 commit comments

Comments
 (0)