Skip to content

Commit 238a7a4

Browse files
authored
add github action
1 parent e17372c commit 238a7a4

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

.github/workflows/main.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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: Unit tests on PHP ${{ 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: Run tests
23+
run: vendor/bin/phpunit -c phpunit.xml --coverage-clover=coverage.xml
24+
25+
- name: Upload code coverage
26+
uses: codecov/codecov-action@v1
27+
with:
28+
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)