mirror of
https://github.com/rectorphp/rector.git
synced 2025-01-17 21:38:22 +01:00
[Test] Separate Weekly CI for code coverage generation (#5044)
This commit is contained in:
parent
6ddb4effd8
commit
bf9e31b515
58
.github/workflows/weekly_code_coverage.yaml
vendored
Normal file
58
.github/workflows/weekly_code_coverage.yaml
vendored
Normal file
@ -0,0 +1,58 @@
|
||||
name: Weekly Code Coverage
|
||||
|
||||
on:
|
||||
schedule:
|
||||
# https://crontab.guru/once-a-week
|
||||
- cron: "0 0 * * 0"
|
||||
|
||||
jobs:
|
||||
weekly_code_coverage:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
actions:
|
||||
-
|
||||
name: "Re-Generate Code Coverage"
|
||||
run: |
|
||||
composer require --dev nimut/phpunit-merger
|
||||
|
||||
vendor/bin/phpunit --coverage-php build/logs/rules.cov rules
|
||||
vendor/bin/phpunit --coverage-php build/logs/packages.cov packages
|
||||
vendor/bin/phpunit --coverage-php build/logs/tests.cov tests
|
||||
vendor/bin/phpunit --coverage-php build/logs/utils.cov utils
|
||||
|
||||
vendor/bin/phpunit-merger coverage build/logs clover.xml
|
||||
|
||||
# Coveralls.io
|
||||
composer require --dev php-coveralls/php-coveralls:^2.4
|
||||
vendor/bin/php-coveralls --coverage_clover=clover.xml -v
|
||||
env:
|
||||
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: 'master'
|
||||
|
||||
name: ${{ matrix.actions.name }}
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
-
|
||||
if: github.event.pull_request.head.repo.full_name == github.repository
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
token: ${{ secrets.ACCESS_TOKEN }}
|
||||
|
||||
# see https://github.com/shivammathur/setup-php
|
||||
-
|
||||
if: github.event.pull_request.head.repo.full_name == github.repository
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 7.4
|
||||
coverage: xdebug
|
||||
tools: composer:v2
|
||||
|
||||
-
|
||||
if: github.event.pull_request.head.repo.full_name == github.repository
|
||||
run: composer install --no-progress --ansi
|
||||
|
||||
-
|
||||
if: github.event.pull_request.head.repo.full_name == github.repository
|
||||
run: ${{ matrix.actions.run }}
|
18
.github/workflows/weekly_pull_requests.yaml
vendored
18
.github/workflows/weekly_pull_requests.yaml
vendored
@ -15,24 +15,6 @@ jobs:
|
||||
name: "Re-Generate CHANGELOG.md"
|
||||
run: "composer changelog"
|
||||
branch: 'automated-regenerated-changelog'
|
||||
-
|
||||
name: "Re-Generate Code Coverage"
|
||||
run: |
|
||||
composer require --dev nimut/phpunit-merger
|
||||
|
||||
vendor/bin/phpunit --coverage-php build/logs/rules.cov rules
|
||||
vendor/bin/phpunit --coverage-php build/logs/packages.cov packages
|
||||
vendor/bin/phpunit --coverage-php build/logs/tests.cov tests
|
||||
vendor/bin/phpunit --coverage-php build/logs/utils.cov utils
|
||||
|
||||
vendor/bin/phpunit-merger coverage build/logs clover.xml
|
||||
|
||||
# Coveralls.io
|
||||
composer require --dev php-coveralls/php-coveralls:^2.4
|
||||
vendor/bin/php-coveralls --coverage_clover=clover.xml -v
|
||||
env:
|
||||
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: 'automated-regenerated-code-coverage'
|
||||
|
||||
name: ${{ matrix.actions.name }}
|
||||
runs-on: ubuntu-latest
|
||||
|
Loading…
x
Reference in New Issue
Block a user