Skip to content

Commit 539ddcb

Browse files
committed
run tests on github
1 parent 4a85ee9 commit 539ddcb

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

.github/workflows/test.yml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Unit Tests
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
run:
7+
name: PHP ${{ matrix.php-versions }}
8+
runs-on: ubuntu-latest
9+
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
10+
11+
strategy:
12+
matrix:
13+
php-versions: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
14+
fail-fast: false
15+
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v3
19+
20+
- name: Setup PHP
21+
uses: shivammathur/setup-php@v2
22+
with:
23+
php-version: ${{ matrix.php-versions }}
24+
25+
- name: Setup problem matchers
26+
run: |
27+
echo ::add-matcher::${{ runner.tool_cache }}/php.json
28+
echo ::add-matcher::${{ runner.tool_cache }}/phpunit.json
29+
- name: Setup Dependencies
30+
run: |
31+
composer update
32+
composer install
33+
- name: Run PHPUnit
34+
run: |
35+
./vendor/bin/phpunit --verbose

0 commit comments

Comments
 (0)