Skip to content

Commit 392c68d

Browse files
authored
Merge branch 'develop' into cleanup
2 parents fb02cf8 + 9852298 commit 392c68d

File tree

3 files changed

+158
-4
lines changed

3 files changed

+158
-4
lines changed

.github/workflows/ci.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
testsuite:
7+
name: Unittests
8+
runs-on: ubuntu-20.04
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
php-version: ['7.4', '8.0']
13+
14+
steps:
15+
- uses: actions/checkout@v1
16+
with:
17+
fetch-depth: 1
18+
19+
- name: Setup PHP
20+
uses: shivammathur/setup-php@v2
21+
with:
22+
php-version: '7.4'
23+
extensions: mbstring, json, fileinfo
24+
tools: pecl
25+
coverage: pcov
26+
27+
- name: Composer install
28+
run: |
29+
if [[ ${{ matrix.prefer-lowest == 'prefer-lowest' }} ]]; then
30+
composer update --prefer-lowest --prefer-stable
31+
else
32+
composer install
33+
fi
34+
35+
- name: Phive install
36+
run: php config/composer_phive.php
37+
38+
- name: Run PHPUnit
39+
run: |
40+
if [[ ${{ matrix.php-version }} == '7.4' ]]; then
41+
bin/phpunit --coverage-clover=coverage.xml
42+
else
43+
bin/phpunit
44+
fi
45+
46+
- name: Code Coverage Report
47+
if: success() && matrix.php-version == '7.4'
48+
uses: codecov/codecov-action@v1
49+
50+
cs-stan:
51+
name: Coding Standard & Static Analysis
52+
runs-on: ubuntu-20.04
53+
54+
steps:
55+
- uses: actions/checkout@v1
56+
with:
57+
fetch-depth: 1
58+
59+
- name: Setup PHP
60+
uses: shivammathur/setup-php@v2
61+
with:
62+
php-version: '7.4'
63+
extensions: mbstring, json, fileinfo
64+
coverage: none
65+
tools: pecl
66+
67+
- name: Composer install
68+
run: composer update --prefer-lowest --prefer-stable
69+
70+
- name: Phive install
71+
run: php config/composer_phive.php
72+
73+
- name: Run phpcs
74+
run: bin/phpcs --version && bin/phpcs --report=checkstyle --standard=phpcs.xml src/ tests/
75+
76+
- name: Run phpstan
77+
run: bin/phpstan -V && bin/phpstan analyse src -l 5 --error-format=github

config/.github/workflows/ci.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: CI
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
testsuite:
7+
name: Unittests
8+
runs-on: ubuntu-20.04
9+
strategy:
10+
fail-fast: false
11+
matrix:
12+
php-version: ['7.4', '8.0']
13+
14+
steps:
15+
- uses: actions/checkout@v1
16+
with:
17+
fetch-depth: 1
18+
19+
- name: Setup PHP
20+
uses: shivammathur/setup-php@v2
21+
with:
22+
php-version: '7.4'
23+
extensions: mbstring, json, fileinfo
24+
tools: pecl
25+
coverage: pcov
26+
27+
- name: Composer install
28+
run: |
29+
if [[ ${{ matrix.prefer-lowest == 'prefer-lowest' }} ]]; then
30+
composer update --prefer-lowest --prefer-stable
31+
else
32+
composer install
33+
fi
34+
35+
- name: Phive install
36+
run: php config/composer_phive.php
37+
38+
- name: Run PHPUnit
39+
run: |
40+
if [[ ${{ matrix.php-version }} == '7.4' ]]; then
41+
bin/phpunit --coverage-clover=coverage.xml
42+
else
43+
bin/phpunit
44+
fi
45+
46+
- name: Code Coverage Report
47+
if: success() && matrix.php-version == '7.4'
48+
uses: codecov/codecov-action@v1
49+
50+
cs-stan:
51+
name: Coding Standard & Static Analysis
52+
runs-on: ubuntu-20.04
53+
54+
steps:
55+
- uses: actions/checkout@v1
56+
with:
57+
fetch-depth: 1
58+
59+
- name: Setup PHP
60+
uses: shivammathur/setup-php@v2
61+
with:
62+
php-version: '7.4'
63+
extensions: mbstring, json, fileinfo
64+
coverage: none
65+
tools: pecl
66+
67+
- name: Composer install
68+
run: composer update --prefer-lowest --prefer-stable
69+
70+
- name: Phive install
71+
run: php config/composer_phive.php
72+
73+
- name: Run phpcs
74+
run: bin/phpcs --version && bin/phpcs --report=checkstyle --standard=phpcs.xml src/ tests/
75+
76+
- name: Run phpstan
77+
run: bin/phpstan -V && bin/phpstan analyse src -l 5 --error-format=github

phive.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@
2727
<phar url="https://some.tld/tool.phar" />
2828
<phar url="someone/somerepo" />
2929
-->
30-
<phar name="phpunit" version="^9.0" installed="9.0.1" location="./bin/phpunit" copy="true"/>
31-
<phar name="phpstan" version="^0.12.30" installed="0.12.30" location="./bin/phpstan" copy="true"/>
32-
<phar name="phpcs" version="^3.5.3" installed="3.5.3" location="./bin/phpcs" copy="true"/>
33-
<phar name="phpcbf" version="^3.5.3" installed="3.5.4" location="./bin/phpcbf" copy="true"/>
30+
<phar name="phpunit" version="^9.4" installed="9.4.0" location="./bin/phpunit" copy="true"/>
31+
<phar name="phpstan" version="^0.12.53" installed="0.12.53" location="./bin/phpstan" copy="true"/>
32+
<phar name="phpcs" version="^3.5.8" installed="3.5.8" location="./bin/phpcs" copy="true"/>
33+
<phar name="phpcbf" version="^3.5.8" installed="3.5.8" location="./bin/phpcbf" copy="true"/>
3434
<phar name="grumphp" version="^0.19.1" installed="0.19.1" location="./bin/grumphp" copy="true"/>
3535
</phive>

0 commit comments

Comments
 (0)