-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Split GitHub workflows configuration
- Loading branch information
Showing
3 changed files
with
86 additions
and
76 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# .github/workflows/analysis.yml | ||
name: "analysis" | ||
|
||
on: [ push, release, pull_request ] | ||
|
||
jobs: | ||
|
||
build: | ||
name: "PHPStan" | ||
runs-on: ubuntu-18.04 | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v2 | ||
|
||
- 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/phpstan/phpstan/releases/download/0.12.71/phpstan.phar -O phpstan.phar | ||
chmod +x phpstan.phar | ||
php phpstan.phar --version | ||
- name: "Analyses" | ||
run: php phpstan.phar analyse src/ --error-format=github |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# .github/workflows/metrics.yml | ||
name: "metrics" | ||
|
||
on: [ push, release, pull_request ] | ||
|
||
jobs: | ||
|
||
build: | ||
name: "PHP Metrics" | ||
runs-on: ubuntu-18.04 | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: actions/checkout@v2 | ||
|
||
- 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.7.3/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: "Compress artifact" | ||
run: | | ||
cd build/logs | ||
zip -r ../report.zip * -x junit.xml | ||
- name: "Upload artifact" | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: "metrics" | ||
path: build/report.zip |