Skip to content

Commit c86ee69

Browse files
committed
Switch to Github Actions
1 parent 0e9a279 commit c86ee69

File tree

8 files changed

+143
-64
lines changed

8 files changed

+143
-64
lines changed

Diff for: .github/workflows/coding-standards.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: "Check Coding Standards"
2+
3+
on:
4+
pull_request:
5+
push:
6+
7+
jobs:
8+
coding-standards:
9+
name: "Check Coding Standards"
10+
11+
runs-on: "ubuntu-latest"
12+
13+
steps:
14+
- name: "Checkout"
15+
uses: "actions/checkout@v2"
16+
17+
- name: "Setup PHP"
18+
uses: "shivammathur/setup-php@v2"
19+
with:
20+
php-version: "7.4"
21+
tools: composer:v2, cs2pr
22+
23+
- name: "Install dependencies"
24+
run: "composer install --no-interaction --no-progress --no-suggest"
25+
26+
- name: "Run phpcs"
27+
run: vendor/bin/phpcs -q --report=checkstyle | cs2pr

Diff for: .github/workflows/phpmd.yml

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: "Check phpmd"
2+
3+
on:
4+
pull_request:
5+
push:
6+
7+
jobs:
8+
coding-standards:
9+
name: "Check phpmd"
10+
11+
runs-on: "ubuntu-latest"
12+
13+
steps:
14+
- name: "Checkout"
15+
uses: "actions/checkout@v2"
16+
17+
- name: "Setup PHP"
18+
uses: "shivammathur/setup-php@v2"
19+
with:
20+
php-version: "7.4"
21+
tools: composer:v2
22+
23+
- name: "Install dependencies"
24+
run: "composer require phpmd/phpmd --no-interaction --no-progress --no-suggest"
25+
26+
- name: "Run phpmd"
27+
run: vendor/bin/phpmd classes/ text cleancode,codesize,controversial,design,naming,unusedcode

Diff for: .github/workflows/phpunit.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: "PHPUnit tests"
2+
3+
on:
4+
pull_request:
5+
push:
6+
7+
jobs:
8+
phpunit:
9+
name: PHPUnit tests on PHP ${{ matrix.php-version }}
10+
11+
runs-on: "ubuntu-latest"
12+
13+
strategy:
14+
matrix:
15+
php-version:
16+
- "7.2"
17+
- "7.3"
18+
- "7.4"
19+
- "8.0"
20+
21+
steps:
22+
- name: "Checkout"
23+
uses: "actions/checkout@v2"
24+
25+
- name: "Install PHP"
26+
uses: "shivammathur/setup-php@v2"
27+
with:
28+
coverage: "pcov"
29+
php-version: "${{ matrix.php-version }}"
30+
ini-values: memory_limit=-1
31+
tools: composer:v2
32+
33+
- name: "Cache dependencies"
34+
uses: "actions/cache@v2"
35+
with:
36+
path: |
37+
~/.composer/cache
38+
vendor
39+
key: "php-${{ matrix.php-version }}"
40+
restore-keys: "php-${{ matrix.php-version }}"
41+
42+
- name: "Install dependencies"
43+
run: "composer install --no-interaction --no-progress --no-suggest"
44+
45+
- name: "Tests"
46+
run: vendor/bin/phpunit

Diff for: .github/workflows/test-flight.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: "Check test-flight"
2+
3+
on:
4+
pull_request:
5+
push:
6+
7+
jobs:
8+
coding-standards:
9+
name: "Check test-flight"
10+
11+
runs-on: "ubuntu-latest"
12+
13+
steps:
14+
- name: "Checkout"
15+
uses: "actions/checkout@v2"
16+
17+
- name: "Setup PHP"
18+
uses: "shivammathur/setup-php@v2"
19+
with:
20+
php-version: "7.4"
21+
tools: composer:v2
22+
ini-values: "zend.assertions=1"
23+
24+
- name: "Install dependencies"
25+
run: "composer require cundd/test-flight --no-interaction --no-progress --no-suggest"
26+
27+
- name: "Run test-flight"
28+
run: |
29+
vendor/bin/test-flight README.md
30+
vendor/bin/test-flight classes/

Diff for: .travis.yml

-60
This file was deleted.

Diff for: README.md

-2
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,3 @@ Responsable for this project is Markus Malkusch [email protected].
6161

6262
If you like this project and feel generous donate a few Bitcoins here:
6363
[1335STSwu9hST4vcMRppEPgENMHD2r1REK](bitcoin:1335STSwu9hST4vcMRppEPgENMHD2r1REK)
64-
65-
[![Build Status](https://travis-ci.org/php-mock/php-mock-prophecy.svg?branch=master)](https://travis-ci.org/php-mock/php-mock-prophecy)

Diff for: composer.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,11 @@
2121
"require": {
2222
"php": ">=7.2",
2323
"php-mock/php-mock-integration": "^2",
24-
"phpspec/prophecy": "^1"
24+
"phpspec/prophecy": "^1.12.1"
2525
},
2626
"require-dev": {
27-
"phpunit/phpunit": "^9.4.3"
27+
"phpunit/phpunit": "^8.5.13 || ^9.5",
28+
"squizlabs/php_codesniffer": "^3.5"
2829
},
2930
"archive": {
3031
"exclude": ["/tests"]

Diff for: phpcs.xml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0"?>
2+
<ruleset name="Coding Standards">
3+
<rule ref="PSR12"/>
4+
5+
<arg name="colors"/>
6+
<arg value="p"/>
7+
8+
<file>classes</file>
9+
<file>tests</file>
10+
</ruleset>

0 commit comments

Comments
 (0)