Skip to content
This repository was archived by the owner on Jan 5, 2023. It is now read-only.

Commit e21a8d1

Browse files
authored
Merge pull request #6 from mavimo/introduce-test-using-github-actions
Create CI test
2 parents a8014c5 + 5402117 commit e21a8d1

File tree

3 files changed

+42
-3
lines changed

3 files changed

+42
-3
lines changed

.github/main.workflow

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
workflow "Testing" {
2+
on = "push"
3+
resolves = [
4+
"phpunit",
5+
"phpstan-unit",
6+
"phpstan-integration",
7+
]
8+
}
9+
10+
action "dependency" {
11+
uses = "docker://composer"
12+
args = "install --prefer-source --no-progress"
13+
}
14+
15+
action "phpunit" {
16+
uses = "docker://php:7.2"
17+
needs = ["dependency"]
18+
args = "vendor/bin/phpunit"
19+
}
20+
21+
action "phpstan-unit" {
22+
uses = "docker://php:7.2"
23+
needs = ["dependency"]
24+
args = "vendor/bin/phpstan analyse --level=7 --no-progress ./src ./tests"
25+
}
26+
27+
action "phpstan-integration" {
28+
uses = "docker://php:7.2"
29+
needs = ["dependency"]
30+
args = "vendor/bin/phpstan analyse --level=7 --no-progress --errorFormat=junit ./src ./tests"
31+
}

composer.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,16 @@
1111
"phpunit/phpunit": "^8.0"
1212
},
1313
"autoload": {
14-
"psr-4": {"Mavimo\\PHPStan\\ErrorFormatter\\": "src/"}
14+
"psr-4": {
15+
"Mavimo\\PHPStan\\ErrorFormatter\\": "src/"
16+
}
1517
},
1618
"autoload-dev": {
17-
"classmap": ["tests", "vendor/phpstan/phpstan/tests/PHPStan"]
19+
"classmap": [
20+
"vendor/phpstan/phpstan/tests/PHPStan"
21+
],
22+
"psr-4": {
23+
"Mavimo\\Tests\\PHPStan\\ErrorFormatter\\": "tests/"
24+
}
1825
}
1926
}

tests/JunitErrorFormatterTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22

33
declare(strict_types = 1);
44

5-
namespace Mavimo\PHPStan\ErrorFormatter;
5+
namespace Mavimo\Tests\PHPStan\ErrorFormatter;
66

7+
use Mavimo\PHPStan\ErrorFormatter\JunitErrorFormatter;
78
use PHPStan\Command\ErrorFormatter\TestBaseFormatter;
89

910
class JunitErrorFormatterTest extends TestBaseFormatter

0 commit comments

Comments
 (0)