Skip to content

Commit 30b498a

Browse files
authored
Workflow (#56)
1 parent bc6ddce commit 30b498a

File tree

4 files changed

+34
-50
lines changed

4 files changed

+34
-50
lines changed

.circleci/config.yml

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

.github/workflows/unit-test.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: unit-test.yml
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
9+
10+
jobs:
11+
unit-test:
12+
strategy:
13+
matrix:
14+
os: [ ubuntu-latest, windows-latest ]
15+
php: [ '8.0', '8.1', '8.2', '8.3', '8.4' ]
16+
17+
runs-on: ${{matrix.os}}
18+
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: shivammathur/setup-php@v2
22+
with:
23+
php-version: ${{matrix.php}}
24+
coverage: xdebug
25+
tools: composer, phpunit
26+
- run: composer install -n --prefer-dist
27+
- run: php vendor/phpunit/phpunit/phpunit -c phpunit.xml --coverage-clover=coverage.xml
28+
- run: php vendor/bin/coverage-check coverage.xml 70

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
"ext-xdebug": "*"
4040
},
4141
"require-dev": {
42-
"phpunit/phpunit": "9.5.*"
42+
"phpunit/phpunit": "^9",
43+
"rregeer/phpunit-coverage-check": "^0.3.1"
4344
},
4445
"autoload": {
4546
"psr-4": {

tests/CubexTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,9 @@ public function testFromContext()
395395
public function testDir()
396396
{
397397
$cubex = $this->_cubex();
398-
self::assertEquals(__DIR__ . '/.cubex/', Cubex::dir($cubex->getContext()));
398+
self::assertEquals(
399+
__DIR__ . DIRECTORY_SEPARATOR . '.cubex' . DIRECTORY_SEPARATOR,
400+
Cubex::dir($cubex->getContext())
401+
);
399402
}
400403
}

0 commit comments

Comments
 (0)