From 943bcbbec7c741d3f749324ca2714b90e952eb67 Mon Sep 17 00:00:00 2001 From: Tasuku Yamashita Date: Mon, 16 Dec 2024 12:09:07 +0900 Subject: [PATCH] Enable debug profiling. --- .github/workflows/ci.yaml | 11 ++++++++++- tests/phpunit.xml.dist | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 8172058..cc18377 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -10,10 +10,19 @@ jobs: uses: shivammathur/setup-php@v2 with: php-version: '8.3' + extentions: xdebug, zlib tools: composer:v2 - name: Checkout uses: actions/checkout@v4 - name: Composer install uses: ./.github/actions/composer-install - name: Run PhpUnit tests - run: ./vendor/bin/phpunit tests + run: | + mkdir -p ${{ runner.temp }}/xdebug/output + php -d xdebug.mode=profile -d xdebug.output_dir=${{ runner.temp }}/xdebug/output ./vendor/bin/phpunit tests + - name: Upload xdebug profile + uses: actions/upload-artifact@v4 + with: + name: xdebug-profile + path: ${{ runner.temp }}/xdebug/output + retention-days: 1 diff --git a/tests/phpunit.xml.dist b/tests/phpunit.xml.dist index 1eb137f..2d463e4 100644 --- a/tests/phpunit.xml.dist +++ b/tests/phpunit.xml.dist @@ -5,7 +5,7 @@ backupGlobals="false" colors="true" beStrictAboutTestsThatDoNotTestAnything="false" - bootstrap="./test/bootstrap.php"> + bootstrap="./bootstrap.php"> .