-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (37 loc) · 1.49 KB
/
metrics.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# .github/workflows/metrics.yml
name: "Metrics"
on: [ push ]
jobs:
build:
name: "PHP Metrics"
runs-on: ubuntu-22.04
steps:
- name: "Checkout"
uses: actions/checkout@v3
- 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/ . --exclude-dirs=Tests/
- name: "Upload artifact"
uses: actions/upload-artifact@v3
with:
name: "metrics"
path: |
build/logs
!build/logs/junit.xml