Skip to content

Commit af24ebc

Browse files
author
Kevin Buchholz
authored
Merge pull request #47 from sourceboat/feature/use_github_workflows
2 parents 0f50381 + 85c3ac2 commit af24ebc

17 files changed

+438
-119
lines changed

.github/workflows/lint.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: "Lint PHP"
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- master
7+
- develop
8+
jobs:
9+
phpcs:
10+
name: PHPCS
11+
runs-on: ubuntu-20.04
12+
strategy:
13+
matrix:
14+
php-versions: ['7.4']
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
19+
- name: Setup
20+
uses: shivammathur/setup-php@v2
21+
with:
22+
php-version: ${{ matrix.php-versions }}
23+
extensions: mbstring, curl, zip
24+
coverage: none
25+
tools: composer
26+
27+
- name: Install dependencies
28+
run: composer update --no-interaction --no-suggest --no-progress --optimize-autoloader
29+
30+
- name: Run
31+
run: composer run lint:phpcs
32+
phpmd:
33+
name: PHPMD
34+
runs-on: ubuntu-20.04
35+
strategy:
36+
matrix:
37+
php-versions: ['7.4']
38+
steps:
39+
- name: Checkout
40+
uses: actions/checkout@v2
41+
42+
- name: Setup
43+
uses: shivammathur/setup-php@v2
44+
with:
45+
php-version: ${{ matrix.php-versions }}
46+
extensions: mbstring, curl, zip
47+
coverage: none
48+
tools: composer
49+
50+
- name: Install dependencies
51+
run: composer update --no-interaction --no-suggest --no-progress --optimize-autoloader
52+
53+
- name: Run
54+
run: composer run lint:phpmd

.github/workflows/test.yaml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: "Test PHP"
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- master
7+
- develop
8+
jobs:
9+
phpunit:
10+
name: PHPUnit
11+
runs-on: ubuntu-20.04
12+
strategy:
13+
matrix:
14+
php-versions: ['7.3', '7.4', '8.0']
15+
composer-arguments: ['--prefer-lowest', '']
16+
allowed-to-fail: [false]
17+
include:
18+
- php-versions: '8.1'
19+
composer-arguments: ['--prefer-lowest', '']
20+
allowed-to-fail: true
21+
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v2
25+
26+
- name: Setup
27+
uses: shivammathur/setup-php@v2
28+
with:
29+
php-version: ${{ matrix.php-versions }}
30+
extensions: mbstring, curl, zip
31+
coverage: xdebug
32+
tools: composer
33+
34+
- name: Install dependencies
35+
continue-on-error: ${{ matrix.allowed-to-fail }}
36+
run: composer update --no-interaction --no-suggest --no-progress --optimize-autoloader ${{ matrix.composer-arguments }}
37+
38+
- name: Run tests
39+
continue-on-error: ${{ matrix.allowed-to-fail }}
40+
run: vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover

.travis.yml

Lines changed: 0 additions & 25 deletions
This file was deleted.

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
"phpunit/phpunit": "^9.3",
2828
"phpmd/phpmd": "^2.6",
2929
"squizlabs/php_codesniffer": "^3.3",
30-
"consistence/coding-standard": "^3.8",
3130
"slevomat/coding-standard": "^6.3"
3231
},
3332
"autoload": {

0 commit comments

Comments
 (0)