Skip to content

Update PHPUnit configuration #93

Update PHPUnit configuration

Update PHPUnit configuration #93

Workflow file for this run

# .github/workflows/metrics.yml
name: "Metrics"
on: [ push ]
jobs:
build:
name: "PHP Metrics"
runs-on: ubuntu-22.04
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Build environment"
uses: shivammathur/setup-php@v2
with:
php-version: "7.1"
coverage: "xdebug"
- name: "Dependencies"
run: |
php --version
composer --version
COMPOSER_MEMORY_LIMIT=-1 composer update
- name: "Application"
run: |
mkdir -p build/logs
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
- name: "Tests"
run: vendor/bin/phpunit --log-junit build/logs/junit.xml
- name: "Calculates"
run: php phpmetrics.phar --git --junit=build/logs/junit.xml --report-html=build/logs/ src/
- name: "Upload artifact"
uses: actions/upload-artifact@v4
with:
name: "metrics"
path: |
build/logs
!build/logs/junit.xml