Skip to content

Commit 4dfa0a2

Browse files
author
Andrey Helldar
committed
Small fixes
1 parent b2bbba9 commit 4dfa0a2

File tree

9 files changed

+112
-70
lines changed

9 files changed

+112
-70
lines changed

.codecov.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
comment: off

.gitattributes

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
* text=auto
22

3+
.github/ export-ignore
4+
tests/ export-ignore
5+
36
.codecov.yml export-ignore
47
.editorconfig export-ignore
58
.gitattributes export-ignore
69
.gitignore export-ignore
7-
.php_cs export-ignore
10+
.scrutinizer.yml export-ignore
811
.styleci.yml export-ignore
9-
.travis.yml export-ignore
10-
phpunit.xml.dist export-ignore
11-
tests export-ignore
12-
guides export-ignore
12+
13+
phpunit.xml export-ignore

.github/workflows/coverage.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: coverage
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- coverage
7+
8+
jobs:
9+
scrutinizer:
10+
runs-on: ubuntu-latest
11+
12+
name: Coverage
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v2
17+
18+
- name: Setup PHP
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: 7.4
22+
extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv, bcmath
23+
coverage: xdebug
24+
25+
- name: Composer self update
26+
run: composer self-update
27+
28+
- name: Install dependencies
29+
run: composer update --prefer-stable --prefer-dist --no-progress --no-interaction
30+
31+
- name: Execute tests
32+
run: |
33+
mkdir -p build/logs
34+
sudo vendor/bin/phpunit --coverage-text --coverage-clover=coverage.clover
35+
36+
- name: Export
37+
run: |
38+
wget https://scrutinizer-ci.com/ocular.phar
39+
sudo php ocular.phar code-coverage:upload --format=php-clover coverage.clover

.github/workflows/phpunit.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: phpunit
2+
on: [ push ]
3+
4+
jobs:
5+
build:
6+
runs-on: ubuntu-latest
7+
8+
strategy:
9+
fail-fast: true
10+
matrix:
11+
php: [ "7.2", "7.3", "7.4", "8.0" ]
12+
13+
name: PHP ${{ matrix.php }}
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v2
18+
19+
- name: Setup PHP
20+
uses: shivammathur/setup-php@v2
21+
with:
22+
php-version: ${{ matrix.php }}
23+
extensions: curl, mbstring, zip, pcntl, pdo, pdo_sqlite, iconv, bcmath
24+
coverage: none
25+
26+
- name: Composer self update
27+
run: composer self-update
28+
29+
- name: Install dependencies
30+
run: composer update --prefer-stable --prefer-dist --no-progress --no-interaction
31+
32+
- name: Execute tests
33+
run: sudo vendor/bin/phpunit

.gitignore

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ vendor/
33

44
tests/files/source.php.*.php
55

6-
composer.lock
7-
6+
*.bak
87
*.cache
9-
*.log
8+
*.clover
9+
*.orig
10+
11+
*.lock

.travis.yml

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

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
"andrey-helldar/support": "^2.0"
2222
},
2323
"require-dev": {
24-
"phpstan/phpstan": "^0.12.7",
25-
"phpunit/phpunit": "^7.0|^8.0"
24+
"phpunit/phpunit": "^8.0|^9.0"
2625
},
2726
"suggest": {
2827
"symfony/thanks": "Give thanks (in the form of a GitHub) to your fellow PHP package maintainers"

phpstan.neon

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

phpunit.xml

Lines changed: 27 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,32 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit backupGlobals="false"
3-
backupStaticAttributes="false"
4-
bootstrap="vendor/autoload.php"
5-
colors="true"
6-
convertErrorsToExceptions="true"
7-
convertNoticesToExceptions="true"
8-
convertWarningsToExceptions="true"
9-
processIsolation="false"
10-
stopOnFailure="false">
2+
<phpunit
3+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
backupGlobals="false"
6+
backupStaticAttributes="false"
7+
bootstrap="vendor/autoload.php"
8+
colors="true"
9+
convertErrorsToExceptions="true"
10+
convertNoticesToExceptions="true"
11+
convertWarningsToExceptions="true"
12+
processIsolation="false"
13+
stopOnError="false"
14+
stopOnFailure="false"
15+
verbose="true"
16+
>
17+
<coverage processUncoveredFiles="true">
18+
<include>
19+
<directory suffix=".php">./src</directory>
20+
</include>
21+
<report>
22+
<clover outputFile="build/logs/clover.xml"/>
23+
<html outputDirectory="build/logs/coverage"/>
24+
<text outputFile="build/logs/coverage.txt"/>
25+
</report>
26+
</coverage>
1127
<testsuites>
12-
<testsuite name="Versionable Suite">
13-
<directory>tests/</directory>
28+
<testsuite name="Test Suite">
29+
<directory suffix="Test.php">./tests</directory>
1430
</testsuite>
1531
</testsuites>
16-
<filter>
17-
<whitelist>
18-
<directory suffix=".php">src/</directory>
19-
</whitelist>
20-
</filter>
2132
</phpunit>

0 commit comments

Comments
 (0)