Skip to content

Commit

Permalink
Merge pull request #10 from matteosister/ci_setup
Browse files Browse the repository at this point in the history
Update CI Pipeline
  • Loading branch information
mattiabasone authored Sep 24, 2021
2 parents 4766907 + d08d0ae commit 48bca4f
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 35 deletions.
22 changes: 5 additions & 17 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Test

on: [push, pull_request]
on: [push]

jobs:
test:
Expand Down Expand Up @@ -34,20 +34,8 @@ jobs:
run: (test -d vendor && echo vendor directory exists) || composer install --prefer-dist --no-progress --no-suggest
- name: Run PHPUnit
run: ./bin/phpunit --coverage-text --coverage-clover clover.xml
- name: "[Code Coverage Report] Extract branch name"
- name: Upload Scrutinizer coverage
if: matrix.php-versions == '8.0'
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: "[Code Coverage Report] Checkout branch"
if: matrix.php-versions == '8.0'
shell: bash
run: git fetch --depth 1 && git checkout ${{ steps.extract_branch.outputs.branch }}
# - name: "[Code Coverage Report] Upload coverage"
# if: matrix.php-versions == '8.0'
# run: ./bin/ocular code-coverage:upload --format=php-clover clover.xml
# - name: "[Coveralls] Send report"
# if: matrix.php-versions == '8.0'
# run: ./bin/php-coveralls -v -x clover.xml -o coveralls-upload.json
# env:
# COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
uses: sudo-bot/action-scrutinizer@latest
with:
cli-args: "--format=php-clover clover.xml"
32 changes: 21 additions & 11 deletions .scrutinizer.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
build:
nodes:
analysis:
project_setup:
override:
- 'true'
tests:
override:
- php-scrutinizer-run
-
command: phpcs-run
use_website_config: true
tests: true

checks:
php: true
coding_style:
php: { }

tools:
php_sim: true
php_pdepend: true
php_analyzer: true
php_code_sniffer:
config:
standard: PSR2
php_changetracking: true
php_cs_fixer:
config: { level: psr2 }
php_mess_detector: true
sensiolabs_security_checker: true
external_code_coverage:
timeout: 600

filter:
excluded_paths:
- 'spec/*'
- 'tests/*'
- 'examples/*'
- 'vendor/*'
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
Patch Manager
=============

[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/matteosister/patch-manager/badges/quality-score.png?b=dev)](https://scrutinizer-ci.com/g/matteosister/patch-manager/?branch=dev)
[![Build Status](https://travis-ci.org/matteosister/patch-manager.svg?branch=dev)](https://travis-ci.org/matteosister/patch-manager)
[![SensioLabsInsight](https://insight.sensiolabs.com/projects/3c24052a-6051-4125-ad12-ad4e210de114/mini.png)](https://insight.sensiolabs.com/projects/3c24052a-6051-4125-ad12-ad4e210de114)
[![PHP Version](https://img.shields.io/packagist/php-v/cypresslab/patch-manager/dev-master)](https://packagist.org/packages/cypresslab/patch-manager)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/matteosister/patch-manager/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/matteosister/patch-manager/?branch=master)
[![Code Coverage](https://scrutinizer-ci.com/g/matteosister/patch-manager/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/matteosister/patch-manager/?branch=master)
[![Build Status](https://img.shields.io/github/workflow/status/matteosister/patch-manager/Test)](https://github.com/matteosister/patch-manager/actions)
[![Packagist Version](https://img.shields.io/packagist/v/cypresslab/patch-manager)](https://packagist.org/packages/cypresslab/patch-manager)
[![Packagist Downloads](https://img.shields.io/packagist/dt/cypresslab/patch-manager)](https://packagist.org/packages/cypresslab/patch-manager)

A php library to manage PATCH requests in a standardized (and elegant) way

Expand Down
4 changes: 1 addition & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
"phpspec/prophecy-phpunit": "^2.0",
"phpstan/phpstan": "^0.12.99",
"phpstan/phpstan-doctrine": "^0.12.44",
"phpstan/phpstan-mockery": "^0.12.14",
"php-coveralls/php-coveralls": "^2.4",
"scrutinizer/ocular": "^1.8"
"phpstan/phpstan-mockery": "^0.12.14"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit 48bca4f

Please sign in to comment.