Update workflow configuration #479
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .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 |