From f9dc0ac7d7f6ca54c41be08eb4e825e4b85de6f7 Mon Sep 17 00:00:00 2001 From: webeweb Date: Thu, 16 May 2024 09:10:46 +0200 Subject: [PATCH] Update workflow configuration --- .coveralls.yml | 4 --- .github/workflows/analysis.yml | 10 ++++---- .github/workflows/build.yml | 18 +++++++------ .github/workflows/metrics.yml | 46 ---------------------------------- composer.json | 1 - 5 files changed, 15 insertions(+), 64 deletions(-) delete mode 100644 .coveralls.yml delete mode 100644 .github/workflows/metrics.yml diff --git a/.coveralls.yml b/.coveralls.yml deleted file mode 100644 index 35e63eea8..000000000 --- a/.coveralls.yml +++ /dev/null @@ -1,4 +0,0 @@ -# .coveralls.yml -coverage_clover: "build/logs/clover.xml" -json_path: "build/logs/coveralls-upload.json" -service_name: "travis-ci" diff --git a/.github/workflows/analysis.yml b/.github/workflows/analysis.yml index 40a47a426..f1dfd8d92 100644 --- a/.github/workflows/analysis.yml +++ b/.github/workflows/analysis.yml @@ -10,22 +10,22 @@ jobs: runs-on: ubuntu-22.04 steps: + - name: "Checkout" + uses: actions/checkout@v4 + - name: "Environment" uses: shivammathur/setup-php@v2 with: php-version: "7.1" coverage: "xdebug" - - name: "Checkout" - uses: actions/checkout@v4 - - name: "Dependencies" run: | php --version composer --version COMPOSER_MEMORY_LIMIT=-1 composer update - - name: "Analysis" + - name: "Application" run: | vendor/bin/phpstan --version - vendor/bin/phpstan analyse src --error-format=github + vendor/bin/phpstan analyse src/ --error-format=github diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 28f59b65a..b025ba991 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -22,34 +22,36 @@ jobs: - php-version: "8.3" steps: + - name: "Checkout" + uses: actions/checkout@v4 + - name: "Environment" uses: shivammathur/setup-php@v2 with: php-version: "${{ matrix.php-version }}" coverage: "xdebug" - - name: "Checkout" - uses: actions/checkout@v4 - - name: "Dependencies" run: | php --version composer --version COMPOSER_MEMORY_LIMIT=-1 composer update - - name: "Tests" + - name: "Application" run: | mkdir -p build/logs vendor/bin/phpunit --coverage-clover build/logs/clover.xml - name: "Coverage" env: - COVERALLS_REPO_TOKEN: ${{ secrets.github_token }} + COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} COVERALLS_FLAG_NAME: php-${{ matrix.php-version }} COVERALLS_PARALLEL: true run: | - vendor/bin/php-coveralls --version - vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v + wget -c -nc --retry-connrefused --tries=0 https://github.com/php-coveralls/php-coveralls/releases/download/v2.5.3/php-coveralls.phar -O coveralls.phar + chmod +x coveralls.phar + php coveralls.phar --version + php coveralls.phar --coverage_clover=build/logs/clover.xml -v coverage: name: "Coverage" @@ -61,5 +63,5 @@ jobs: - name: "Coverage" uses: coverallsapp/github-action@v2 with: - github-token: ${{ secrets.github_token }} + github-token: ${{ secrets.GITHUB_TOKEN }} parallel-finished: true diff --git a/.github/workflows/metrics.yml b/.github/workflows/metrics.yml deleted file mode 100644 index 85dcd1f5f..000000000 --- a/.github/workflows/metrics.yml +++ /dev/null @@ -1,46 +0,0 @@ -# .github/workflows/metrics.yml -name: "Metrics" - -on: [ push ] - -jobs: - - build: - name: "PHP Metrics" - runs-on: ubuntu-22.04 - - steps: - - name: "Environment" - uses: shivammathur/setup-php@v2 - with: - php-version: "7.1" - coverage: "xdebug" - - - name: "Checkout" - uses: actions/checkout@v4 - - - name: "Dependencies" - run: | - php --version - composer --version - COMPOSER_MEMORY_LIMIT=-1 composer update - - - name: "Tests" - run: | - mkdir -p build/logs - vendor/bin/phpunit --log-junit build/logs/junit.xml - - - name: "Metrics" - run: | - wget -c -nc --retry-connrefused --tries=0 https://github.com/phpmetrics/PhpMetrics/releases/download/v2.8.1/phpmetrics.phar -O phpmetrics.phar - chmod +x phpmetrics.phar - php phpmetrics.phar --version - php phpmetrics.phar --git --junit=build/logs/junit.xml --report-html=build/logs/ . --exclude-dirs=Tests/ - - - name: "Artifacts" - uses: actions/upload-artifact@v4 - with: - name: "metrics" - path: | - build/logs - !build/logs/junit.xml diff --git a/composer.json b/composer.json index f30583fe7..6e6568b86 100644 --- a/composer.json +++ b/composer.json @@ -50,7 +50,6 @@ "psr/log": "^1.0|^2.0|^3.0" }, "require-dev": { - "php-coveralls/php-coveralls": "^2.5.3", "phpstan/extension-installer": "^1.1", "phpstan/phpstan": "^1.4", "phpstan/phpstan-phpunit": "^1.0",