Skip to content

Commit 48dfd7f

Browse files
committed
Swapped Scrutinizer for GitHub Actions
1 parent b903498 commit 48dfd7f

File tree

4 files changed

+64
-10
lines changed

4 files changed

+64
-10
lines changed

.github/workflows/tests.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
tests:
11+
runs-on: ubuntu-18.04
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
- name: Setup PHP
16+
uses: shivammathur/setup-php@v2
17+
with:
18+
php-version: '7.2'
19+
tools: phpunit:8
20+
21+
- name: Setup problem matchers for PHPUnit
22+
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
23+
24+
- name: Get composer cache directory
25+
id: composercache
26+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
27+
28+
- name: Cache dependencies
29+
uses: actions/cache@v3
30+
with:
31+
path: ${{ steps.composercache.outputs.dir }}
32+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
33+
restore-keys: ${{ runner.os }}-composer-
34+
35+
- run: composer install --no-interaction
36+
37+
- name: PHPUnit
38+
run: phpunit --coverage-text

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
_Make it maintainable or else._
44

5-
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/Rarst/phpcs-cognitive-complexity/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/Rarst/phpcs-cognitive-complexity/?branch=master)
6-
[![Build Status](https://scrutinizer-ci.com/g/Rarst/phpcs-cognitive-complexity/badges/build.png?b=master)](https://scrutinizer-ci.com/g/Rarst/phpcs-cognitive-complexity/build-status/master)
7-
[![Code Coverage](https://scrutinizer-ci.com/g/Rarst/phpcs-cognitive-complexity/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/Rarst/phpcs-cognitive-complexity/?branch=master)
5+
[![Tests Status](https://github.com/rarst/phpcs-cognitive-complexity/actions/workflows/tests.yml/badge.svg)](https://github.com/Rarst/phpcs-cognitive-complexity/actions/workflows/tests.yml)
86
[![Latest Stable Version](https://img.shields.io/packagist/v/rarst/phpcs-cognitive-complexity.svg?label=version)](https://packagist.org/packages/rarst/phpcs-cognitive-complexity)
97
[![PHP from Packagist](https://img.shields.io/packagist/php-v/rarst/phpcs-cognitive-complexity.svg)](https://packagist.org/packages/rarst/phpcs-cognitive-complexity)
108
[![PDS Skeleton](https://img.shields.io/badge/pds-skeleton-blue.svg)](https://github.com/php-pds/skeleton)

composer.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,10 @@
2626
},
2727
"suggest" : {
2828
"dealerdirect/phpcodesniffer-composer-installer": "Installer plugin for automatic standard registration."
29+
},
30+
"config": {
31+
"platform": {
32+
"php": "7.2"
33+
}
2934
}
3035
}

composer.lock

Lines changed: 20 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)