Skip to content

Commit ea370e2

Browse files
authored
Merge pull request #6 from SynergiTech/github-actions
GitHub actions
2 parents e17372c + 164192b commit ea370e2

2 files changed

Lines changed: 32 additions & 1 deletion

File tree

.github/workflows/main.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Unit tests
2+
3+
on: [push]
4+
5+
jobs:
6+
run:
7+
runs-on: [ubuntu-latest]
8+
strategy:
9+
matrix:
10+
php-versions: ['7.1', '7.2', '7.3']
11+
name: Tests - ${{ matrix.php-versions }}
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v1
15+
16+
- name: Setup PHP
17+
uses: shivammathur/setup-php@v1
18+
with:
19+
php-version: ${{ matrix.php-versions }}
20+
coverage: xdebug
21+
22+
- name: Install deps
23+
run: composer install
24+
25+
- name: Run tests
26+
run: vendor/bin/phpunit -c phpunit.xml --coverage-clover=coverage.xml
27+
28+
- name: Upload code coverage
29+
uses: codecov/codecov-action@v1
30+
with:
31+
token: ${{ secrets.CODECOV_TOKEN }}

test/ChromeTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ private function getMockedProcess()
1313
$proc = $this->createMock(Process::class, ['mustRun']);
1414
$proc->expects($this->once())
1515
->method('mustRun')
16-
->willReturn('rendered-pdf');
16+
->will($this->returnSelf());
1717
return $proc;
1818
}
1919

0 commit comments

Comments
 (0)