Skip to content
Merged

Wip #147

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
13 changes: 2 additions & 11 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,19 @@ jobs:
runs-on: ubuntu-latest

steps:
# Шаг 1: Клонирование репозитория
- name: Checkout code
uses: actions/checkout@v3

# Шаг 2: Настройка PHP и расширений
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4' # ← Было '8.3', стало '8.4'
php-version: '8.4' # ← Changed from '8.3' to '8.4'
extensions: xdebug
coverage: xdebug # ← Явно включаем драйвер покрытия
coverage: xdebug # ← Explicitly enable coverage driver

# Шаг 3: Валидация composer.json и composer.lock
- name: Validate composer.json and composer.lock
run: composer validate --strict

# Шаг 4: Кэширование зависимостей Composer
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
Expand All @@ -41,30 +37,25 @@ jobs:
restore-keys: |
${{ runner.os }}-php-

# Шаг 5: Установка зависимостей
- name: Install dependencies
run: composer install --prefer-dist --no-progress

# Шаг 6: Загрузка PHPUnit PHAR
- name: Download PHPUnit PHAR
run: |
wget https://phar.phpunit.de/phpunit.phar
chmod +x phpunit.phar
mv phpunit.phar /usr/local/bin/phpunit

# Шаг 7: Проверка версии PHPUnit
- name: Check PHPUnit version
run: phpunit --version

# Шаг 8: Запуск тестов с генерацией отчета о покрытии
- name: Run PHPUnit tests with coverage
run: |
mkdir -p build/logs
phpunit --configuration phpunit.xml --coverage-clover build/logs/clover.xml --debug
env:
XDEBUG_MODE: coverage

# Шаг 9: Отправка данных о покрытии в Coveralls
- name: Send coverage to Coveralls
uses: coverallsapp/github-action@v2
with:
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
/vendor/
/composer.lock
/.phpunit.cache/
/.phpunit.result.cache
/.phpunit.result.cache
/nbproject/
2 changes: 0 additions & 2 deletions src/RouterInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

namespace Rudra\Router;

use Rudra\Exceptions\RouterException;

interface RouterInterface
{
public function set(array $route): void;
Expand Down
1 change: 0 additions & 1 deletion tests/RouterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
use Rudra\Container\Rudra as R;
use Rudra\Router\RouterFacade as Router;
use Rudra\Router\Tests\Stub\Controllers\MainController;
use Rudra\Router\Tests\Stub\Middleware\Middleware;

class RouterTest extends \PHPUnit\Framework\TestCase
{
Expand Down
24 changes: 19 additions & 5 deletions tests/Stub/Controllers/AnnotatedController.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,23 @@ public function actionView(string $id): void
Rudra::config()->set(["annotatedView" => "annotatedView"]);
}

public function shipInit() {}
public function containerInit() {}
public function init() {}
public function before() {}
public function after() {}
public function shipInit()
{
}

public function containerInit()
{
}

public function init()
{
}

public function before()
{
}

public function after()
{
}
}
24 changes: 19 additions & 5 deletions tests/Stub/Controllers/MainController.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,23 @@ public function actionRegexGet()
Rudra::config()->set(["regex" => "regex"]);
}

public function shipInit() {}
public function containerInit() {}
public function init() {}
public function before() {}
public function after() {}
public function shipInit()
{
}

public function containerInit()
{
}

public function init()
{
}

public function before()
{
}

public function after()
{
}
}
Loading