Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Tests
on:
push:
branches: [ "**" ]
pull_request:

jobs:
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ["8.3", "8.4"]

name: PHP ${{ matrix.php }}

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
tools: composer
extensions: json, mbstring, ctype, openssl, tokenizer, pdo, curl

- name: Validate composer.json
run: composer validate --no-check-publish

- name: Install dependencies
run: composer update --no-interaction --prefer-dist --ansi

- name: Run tests
run: vendor/bin/phpunit --no-coverage

phplint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: shivammathur/setup-php@v2
with:
php-version: '8.3'

- name: Install dependencies
run: composer install --no-interaction --prefer-dist

- name: Run laravel pint
run: ./vendor/bin/pint --test
44 changes: 0 additions & 44 deletions .github/workflows/unit-tests.yml

This file was deleted.

4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "lukewaite/monolog-memory-usage-processor",
"require": {
"php": "^8.0",
"php": "^8.3|^8.4",
"monolog/monolog": "^3.0"
},
"require-dev": {
"laravel/pint": "^1.15",
"phpunit/phpunit": "^10.0",
"phpunit/phpunit": "^10.0|^11.0",
"squizlabs/php_codesniffer": "^2.8",
"scrutinizer/ocular": "^1.9",
"symfony/console": "^6.0"
Expand Down
4 changes: 2 additions & 2 deletions tests/MemoryUsageProcessorTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ protected function getRecord($level = Logger::WARNING, $message = 'test', $conte
);
}

public function testProcessor()
public function test_processor()
{
$processor = new MemoryUsageProcessor;
$record = $processor($this->getRecord());
Expand All @@ -35,7 +35,7 @@ public function testProcessor()
$this->assertWithFormatting($record, 'memory_peak_usage');
}

public function testProcessorWithoutFormatting()
public function test_processor_without_formatting()
{
$processor = new MemoryUsageProcessor(false);
$record = $processor($this->getRecord());
Expand Down