diff --git a/.github/workflows/auto_assign_owner.yml b/.github/workflows/auto_assign_owner.yml new file mode 100644 index 0000000..2802e78 --- /dev/null +++ b/.github/workflows/auto_assign_owner.yml @@ -0,0 +1,10 @@ +name: Auto assign owner when opening PRs +on: + pull_request: + types: [ opened ] +jobs: + auto-assign-owner: + runs-on: ubuntu-latest + steps: + - name: Auto assign owner + uses: toshimaru/auto-author-assign@v3.0.2 diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index 6fcf0c0..1b274b5 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -17,7 +17,7 @@ jobs: steps: - name: Checkout Code - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 @@ -30,7 +30,7 @@ jobs: tools: composer-dependency-analyser, composer-normalize, composer-require-checker, cs2pr - name: Install Composer Dependencies - uses: ramsey/composer-install@v3 + uses: ramsey/composer-install@v4 with: dependency-versions: "highest" composer-options: "--prefer-stable --optimize-autoloader --no-progress --no-interaction" @@ -134,7 +134,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 @@ -146,7 +146,7 @@ jobs: extensions: filter - name: Install Composer Dependencies - uses: ramsey/composer-install@v3 + uses: ramsey/composer-install@v4 with: dependency-versions: ${{ matrix.dependencies }} composer-options: "--prefer-stable --optimize-autoloader --no-progress --no-interaction" @@ -171,12 +171,15 @@ jobs: DYNAMODB_URL: http://localhost:4566 DATABASE_SERVER_VERSION: ${{ matrix.mysql-version }} run: | - vendor/bin/phpunit --colors=always --testdox \ - --log-junit tests/.results/tests-junit.xml \ - --coverage-clover tests/.results/tests-clover.xml + vendor/bin/phpunit \ + --colors=always \ + --testdox \ + --testdox-summary \ + --coverage-clover tests/.results/tests-clover.xml \ + --log-junit tests/.results/tests-junit.xml - name: Upload coverage files - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v7 with: name: ${{ github.job }}-${{ matrix.php-version }}-${{ matrix.dependencies }}-coverage include-hidden-files: true @@ -187,11 +190,11 @@ jobs: name: Code Analysis runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 with: fetch-depth: 0 - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v8 with: name: tests-8.4-highest-coverage path: tests/.results/ @@ -203,7 +206,7 @@ jobs: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' tests-junit.xml - name: SonarCloud Scan - uses: SonarSource/sonarqube-scan-action@v7.0.0 + uses: SonarSource/sonarqube-scan-action@v8.0.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/composer.json b/composer.json index a20952e..d01698f 100644 --- a/composer.json +++ b/composer.json @@ -43,7 +43,7 @@ "opensearch-project/opensearch-php": "^2.5", "phpstan/phpstan": "^2.1", "phpstan/phpstan-phpunit": "^2.0", - "phpunit/phpunit": "^12.5", + "phpunit/phpunit": "^13.1", "psr/cache": "^2.0", "rector/rector": "^2.3", "shipmonk/composer-dependency-analyser": "^1.8", @@ -88,29 +88,36 @@ "integration": [ "rm -rf tests/App/var/*", "tests/App/bin/setup_databases.sh test", - "phpunit --log-events-text phpunit.log --no-coverage --no-logging --no-progress --testsuite Integration" + "phpunit --testsuite Integration --testdox --testdox-summary --no-coverage --no-logging" ], "integration-coverage": [ "rm -rf tests/App/var/*", "tests/App/bin/setup_databases.sh test", - "XDEBUG_MODE=coverage phpunit --log-events-text phpunit.log --no-progress --testsuite Integration --log-junit tests/.results/integration-junit.xml --coverage-clover tests/.results/coverage-integration.xml --coverage-html tests/.results/Integration" + "XDEBUG_MODE=coverage phpunit --testsuite Integration --testdox --testdox-summary --log-junit tests/.results/integration-junit.xml --coverage-clover tests/.results/coverage-integration --coverage-html tests/.results/Integration/" ], "phpstan": "phpstan", "rector": "rector process --dry-run --config rector-ci.php src/ tests/", "rector-fix": "rector process --config rector-ci.php src/ tests/", - "sniffer": "phpcs", + "sniffer": [ + "rm -rf tests/App/var/*", + "phpcs" + ], + "sniffer-fix": [ + "rm -rf tests/App/var/*", + "phpcbf" + ], "test": [ "rm -rf tests/App/var/*", "tests/App/bin/setup_databases.sh test", - "phpunit --log-events-text phpunit.log --no-coverage --no-logging --no-progress --testsuite Unit,Integration" + "phpunit --testsuite Unit,Integration --testdox --testdox-summary --no-coverage --no-logging" ], "test-coverage": [ "rm -rf tests/App/var/*", "tests/App/bin/setup_databases.sh test", - "XDEBUG_MODE=coverage phpunit --log-events-text phpunit.log --no-progress --testsuite Unit,Integration --log-junit tests/.results/tests-junit.xml --coverage-clover tests/.results/tests-clover.xml --coverage-html tests/.results/html" + "XDEBUG_MODE=coverage phpunit --testsuite Unit,Integration --testdox --testdox-summary --log-junit tests/.results/tests-junit.xml --coverage-clover tests/.results/tests-clover.xml --coverage-html tests/.results/html/" ], - "unit": "phpunit --log-events-text phpunit.log --no-coverage --no-logging --no-progress --testsuite Unit", - "unit-coverage": "XDEBUG_MODE=coverage phpunit --log-events-text phpunit.log --no-progress --testsuite Unit --log-junit tests/.results/unit-junit.xml --coverage-clover tests/.results/coverage-unit.xml --coverage-html tests/.results/Unit" + "unit": "phpunit --testsuite Unit --testdox --testdox-summary --no-coverage --no-logging", + "unit-coverage": "XDEBUG_MODE=coverage phpunit --testsuite Unit --testdox --testdox-summary --log-junit tests/.results/unit-junit.xml --coverage-clover tests/.results/coverage-unit.xml --coverage-html tests/.results/Unit/" }, "scripts-descriptions": { "cs": "Run PHP CS Fixer with kununu code standards", @@ -120,6 +127,7 @@ "rector": "Run Rector in dry-run mode with CI rules", "rector-fix": "Run Rector in fix mode with CI rules", "sniffer": "Run PHP_CodeSniffer", + "sniffer-fix": "Run PHP_CodeSniffer in fix mode", "test": "Run all tests", "test-coverage": "Run all tests with coverage report", "unit": "Run all unit tests", diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 29bf314..511a755 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,20 +1,12 @@ - + - - - - - - tests/Integration @@ -23,9 +15,6 @@ tests/Unit - - - src