Skip to content

Commit f4d05d6

Browse files
committed
Set up GitHub Actions
1 parent 5f4a36c commit f4d05d6

File tree

2 files changed

+31
-1
lines changed

2 files changed

+31
-1
lines changed

Diff for: .github/workflows/push.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: CI
2+
on: push
3+
jobs:
4+
run:
5+
runs-on: ${{ matrix.operating-system }}
6+
strategy:
7+
fail-fast: false
8+
matrix:
9+
operating-system: [ubuntu-latest, windows-latest, macos-latest]
10+
php-versions: ['7.3', '7.4']
11+
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
16+
- name: Setup PHP
17+
uses: shivammathur/setup-php@v1
18+
with:
19+
php-version: ${{ matrix.php-versions }}
20+
extensions: mbstring
21+
coverage: xdebug
22+
23+
- name: Composer dependencies
24+
run: composer install --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist
25+
26+
- name: Run phpunit
27+
run: ./vendor/bin/phpunit
28+
29+
- name: Run phpcs
30+
run: ./vendor/bin/phpcs

Diff for: src/Printer.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ protected function getCurrentType()
7373

7474
protected function relativePath(string $path)
7575
{
76-
return str_replace(getcwd() . '/', '', $path);
76+
return str_replace(getcwd() . DIRECTORY_SEPARATOR, '', $path);
7777
}
7878

7979
protected function getReflectionFromTest(string $name)

0 commit comments

Comments
 (0)